ct_fatal_error

The ct_fatal_error function causes the Cheap Threads scheduler to terminate with a fatal error.

Prototype:

void ct_fatal_error( void );

Parameters:

None.

Return Value:

None.

Discussion:

The ct_fatal_error function notifies the scheduler that a fatal error has occurred. 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_ERROR.

Except for the value returned to the client application when the scheduler exits, this function works identically to the ct_halt() function.

Restrictions:

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