INtime SDK Help
INtime SDK v7.1 > About INtime > INtime Kernel > Threads > SetRtThreadPriority

Dynamically changes the priority of a non-interrupt thread. The new value must not exceed the containing process' maximum priority.

CAUTION:   Threads can be preempted 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 


A handle for the thread whose priority you want to change.
The thread's new priority. The value 0 (zero) specifies the maximum priority of the specified thread's containing process.

Return Values

Failure. To determine the status, call GetLastRtError.


E_OK 0x0000
No exceptional conditions occurred.
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
You used an invalid value for 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
See Also