MPE/iX Intrinsics Reference Manual (32650-90875)

304 Chapter6
Command Definitions (FLUSHLOG-GETUSERMODE)
GETPRIORITY
GETPRIORITY
NM and CM callable.
Changes the priority of a process. Process handling (PH) capability is required.
Syntax
I16V U16V I16V
GETPRIORITY(
pin,priorityclass
,
rank
);
Parameters
pin
16-bit signed integer by value (required)
Passes the process whose priority is to be changed. To specify the calling
process, set
pin
to zero. To specify a child process, set
pin
to the process
identification number (PIN) of a child process.
priorityclass
16-bit unsigned integer by value (required)
Contains the priority class in which the new process is scheduled (AS, BS,
CS, DS, ES), computed in the following manner:
(ASCII of first character * 256) +
(ASCII of second character)
The integer equivalents are:
AS = 16,723
BS = 16,979
CS = 17,235
DS = 17,491
ES = 17,747
Aborts the calling process if
priorityclass
exceeds the maximum
allowable priority class of the rescheduled process or specifies an invalid
priority class.
Specify any priority class except AS, if in user mode; this function is
limited by the maximum priority assigned to the account by the system
manager. If in privileged mode, processes can be scheduled into all
subqueues including AS. Processes in the linear queues, AS or BS, do not
give up the CPU voluntarily; it could loop indefinitely and prevent other
processes from accessing the CPU.
If in privileged mode, specify the
priorityclass
parameter as an
absolute priority by
x
A, where
x
is an 8-bit priority number and A is the
ASCII character A. For example, to request a priority class of 31 in the
master queue, set
priorityclass
to %017501. An absolute priority must
be specified in order to overcome the MAXPRI setting of an account.
Default: The priority class of the calling process