Sets the priority value for the specified thread.
For SetThreadPriority, specify the priority in the Win32 priority range (THREAD_PRIORITY_IDL to THREAD_PRIORITY_TIME_CRITICAL).
For RtGetThreadPriority, specify the RTX priority (0 to 127).
BOOLEAN SetThreadPriority( HANDLE hThread, int nPriority ); BOOLEAN RtSetThreadPriority( HANDLE hThread, int nPriority );
hThread
nPriority
Threads are scheduled in a round-robin fashion at each priority level. Threads at a lower level are scheduled only when no executable threads exist at a higher level.
To get the priority value of a thread, use GetThreadPriority.
For more information about priorities, see Priorities.
0
(zero)
Versions | Defined in | Include | Link to |
---|---|---|---|
INtime 3.0 | intime/rt/include/iwin32.h intime/rt/include/winbase.h |
iwin32.h windows.h |
iwin32.lib |
Note
This function operates in the real-time portion of your application.
GetThreadPriority, Priorities, iwin32 API, iwin32 Overview