SVR5
pri(D5)
pri --
priority levels for sleep locks
Description
Priority levels are used with sleep locks
to provide a hint for the relative priority
to be assigned to the caller
while running in the kernel after being wakened.
Usage
All entry points unconditionally acquiring a sleep lock
permit the calling code to provide
a pri specification.
This is a hint for the relative priority
the caller wishes to be assigned
while running in the kernel after being unblocked.
NOTE:
Note that the scheduler class-specific code
is free to ignore this hint.
The base kernel can use the following symbols
for specifying the priority.
The list is ordered
-- PRIMEM represents higher priority
than PRINOD.
-
PRIMEM
-
PRINOD
-
PRIBIO
-
PRIMED
-
PRIPIPE
-
PRIVFS
-
PRIWAIT
-
PRIREMOTE
-
PRISLEP
For added flexibility, positive and negative offsets from these symbolic
names are permitted, but the maximum allowable offset is 3.
WARNING:
When converting from
sleep(D3)
to the sleep locks,
note that the priority level values are reversed:
for sleep locks, higher priority values indicate
higher priority levels,
whereas for
sleep( ),
lower priority values indicate
higher priority levels.
The following global variables are defined to achieve a priority
appropriate to a given type of driver or module interface.
pridisk-
waiting in disk driver
prinet-
waiting in network driver
pritty-
waiting in terminal driver
pritape-
waiting in tape driver
Alternatively, if the driver is only concerned about relative priorities,
the following global variables are also available.
For added flexibility,
positive and negative offsets
from the above priority values are permitted,
but the maximum allowable offset is 3.
Defining the priority values as global variables
enhances the binary portability of the drivers.
Furthermore, this scheme permits
a given platform to assign priority values that
are optimal for the platform.
For instance, a disk-less machine may choose
to assign a higher priority value
to prinet compared to pridisk.
Hardware applicability
All
Version applicability
ddi: 5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp, 8, 8mp
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005