Exits from a task or thread.
void exit( int status )
This procedure deletes the calling task or thread. If the CREATETASK_TAG_MSGFROMCHILD tag was set when creating the calling task, then the status is sent to the parent process through a message.
This procedure never returns.
Folio call implemented in kernel folio V20.
When tasks (including threads) have finished their work, they should call exit()
to die gracefully. The system will call exit()
on behalf of the task that returns from the top-level routine. exit()
does necessary clean-up work when a task is finished, including the cleanup required for a thread created by the CreateThread()
library routine.
CreateThread
(), DeleteItem(), DeleteThread()