Dynamically changes the priority of a non-interrupt thread. The new value must not exceed the containing process' maximum priority.
CAUTION: Threads can be pre-empted for long periods of time, and performance can degrade when a thread uses this system call to lower its own priority.
BOOLEAN SetRtThreadPriority( RTHANDLE hThread, // handle for thread BYTE byPriority // new priority );
hThread
byPriority
TRUE
FALSE
E_OK 0x0000
E_LIMIT 0x0004
byPriority
's priority value is higher (numerically smaller) than the maximum priority of the specified thread's containing process.
E_CONTEXT 0x0005
hThread
specifies an interrupt thread. You cannot dynamically set the priority of an interrupt thread.
E_EXIST 0x0006
hThread
.
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 |