Guardian Procedure Calls Reference Manual (G06.25+)

Guardian Procedure Calls (P)
Guardian Procedure Calls Reference Manual522629-013
12-34
PRIORITY Procedure
(Superseded by PROCESS_SETINFO_ Procedure
new-priority input
INT:value
specifies a new execution priority value in the range {1:199} for this process. If
omitted, the initial priority remains unchanged.
init-priority output
INT:ref:1
returns the initial run priority of the process when it was started.
Considerations
A caller of PRIORITY executing in privileged mode can set its priority to a value
greater than 199. However, if such a process has a priority greater than that of the
memory-manager process and gets a memory page fault, the call to PRIORITY
fails: a Guardian TNS process gets a “no memory available” trap (trap 12); an OSS
or native process receives a SIGNOMEM signal.
The current priority rather than the initial priority is returned. Due to the sliding
priority feature on NonStop
servers, the current priority may be lower than the initial
priority if the process is processor-bound (that is, the process does not perform any
I/O requests while running).
Example
LAST^PRI := PRIORITY ( 100 ); ! changes the current
! priority to 100.