Deletes a thread referenced by the given handle.
BOOLEAN DeleteRtThread( RTHANDLE hThread // handle for RT thread );
hThread
If a thread deletes itself by calling this function and the containing process makes reference to any RSLs, the entry point of each RSL is called with a reason code of RSL_THREAD_DETACH in the context of the thread being deleted.
DeleteRtThread enables any thread currently within a region or waiting in a queue for a region to exit the region before being deleted. Deleting the thread counts toward both the object and thread limits for the containing process.
Any attempt to delete an interrupt thread results in an E_CONTEXT status code. Use ResetRtInterruptHandler instead.
TRUE
FALSE
E_OK 0x0000
E_CONTEXT 0x0005
hThread
specifies an RT handle for an interrupt thread.
E_EXIST 0x0006
hThread
.
hThread
is an RT handle for a thread whose process is being deleted.
E_TYPE 0x8002
hThread
requires an RT handle for a thread. Versions | Defined in | Include | Link to |
---|---|---|---|
INtime 3.0 | intime/rt/include/rtbase.h | rt.h | rt.lib |