INtime SDK Help
SetRtProcessMaxPriority
INtime SDK v6 > About INtime > INtime Kernel > Processes > SetRtProcessMaxPriority

Changes the maximum possible static priority of all threads in a process. This sets a limit on the highest static priority it is possible to set for a thread in the process.

Note:   This call adjusts the maximum priority of theads in the containing process. It does not affect the priority of the calling thread or any other thread in the process. Only SetRtThreadPriority adjusts a thread's priority.
BOOLEAN SetRtProcessMaxPriority(
    RTHANDLE hProcess,    // handle for a process
    BYTE byPriority       // new maximum priority
);

Parameters

hProcess
A handle for an RT process.
byPriority
The new maximum priority for threads in the specified process.

Remarks

SetRtProcessMaxPriority must be higher (numerically lower) than the current value of the containing process's maximum priority. Typically, applications which include interrupt threads use this call.

The default value of the process maximum priority for a newly-created process in INtime is 129.

This value does not affect the maximum dynamic priority of a thread.

Return Values

TRUE
Success.
FALSE
Failure. To determine the status, call GetLastRtError.

Status

E_OK 0x0000
No exceptional conditions occurred.
E_LIMIT 0x0004
byPriority's priority value is lower (numerically greater) than the byPriority of the specified process.
E_CONTEXT 0x0005
hProcess contains an invalid process RT handle.
E_EXIST 0x0006
You used an invalid value for hProcess.

Requirements

Versions Defined in Include Link to
INtime 3.0 intime/rt/include/rtbase.h rt.h rt.lib
See Also

Threads