ct_halt

The ct_halt function causes the Cheap Threads scheduler to terminate.

Prototype:

void ct_halt( void );

Parameters:

None.

Return Value:

None.

Discussion:

The ct_halt function notifies the scheduler that it should terminate. When the current thread returns control to the scheduler, the scheduler destroys all threads, cleans up its internal data structures, and returns control to the client application, with a return value of CT_OKAY.

The scheduler may of course return CT_ERROR if a fatal error occurs after the call to ct_halt().

Restrictions:

It makes sense to call ct_halt() only from a thread or user exit, i.e. when the scheduler is running. If you call ct_halt() when the scheduler is not running, the call has no effect.
Home