At any time, the thread running is the one with the highest priority which is ready to run. The priority of a thread is simply a number; the value determines the priority; the greater the number, the higher the priority.
This value is termed the absolute priority of the thread and is calculated from the priority values assigned through the API to both the thread and the process which owns that thread.
A process can take one of eight discrete priority values; these are
the individual enumerators of the TProcessPriority enumeration, defined in
e32std.h
, and range from EPriorityLow
, the lowest, to
EPrioritySupervisor
, the highest.
In practice, user processes can only be assigned
priorities that are less than EPriorityWindowServer
,
i.e. a user process can only be assigned one of the values:
EPriorityLow
EPriorityBackground
EPriorityForeGround
EPriorityHigh
A process priority can be assigned:
when the associated .exe
is built; this is done by
specifying the value in the .mmp
file that defines the
project.
using RProcess::SetPriority()
.
Using Makmake in the Build Tools Guide.