Sets the threads dispatchability status.
int _threadstatus (int handle, int mode);
int threadstatus (int handle, int mode);
Required Header |
<process.h> |
Return Value
0 is success, 4 is an O/S specific error. -1 indicates a JCC error.
Parameters
handle
The handle returned from _beginthread
mode
The mode to set: 0 is STOP and 1 is START.
Remarks
The _threadstatus function schedules a thread to start or stop based on operating system limits. This function may return before the requested thread is stopped. The primary thread (0) cannot have its status changed.
See Also _endthread, _beginthread, _syncthread, _threadpriority