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 
);
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.INtime thread priority 0-2 masks all RT interrupts including the INtime system tick.
INtime thread priority 3-60 masks all RT interrupts with IDT vectors 224-239.
INtime thread priority 61-255 makss no RT interrupts.
Multiple MSI uses AllocateRtInterrupts() to allocate vectors in the range 96-223. Interrupts on these vectors are masked by threads with priority 0-128.
| Versions | Defined in | Include | Link to | 
|---|---|---|---|
| INtime 3.0 | intime/rt/include/rtbase.h | rt.h | rt.lib |