HP 3000 Manuals

GETPRIORITY [ MPE/iX Intrinsics Reference Manual ] MPE/iX 5.0 Documentation


MPE/iX Intrinsics Reference Manual

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 xA, 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


NOTE Scheduling a process into the AS or BS priority class can result in the rescheduled process deadlocking the system or locking out system and user processes from execution.
rank 16-bit signed integer by value (optional) Used for backward-compatibility with pre-MPE IV operating systems only. Operation Notes A process must be running in privileged mode to specify absolute priority. A process can change its own priority or that of its child, but it cannot reschedule its parent. Condition Codes CCE (2) Request granted. CCG (0) Request denied. The process specified is not currently accessible (for example, unborn or dying). CCL (1) Request denied. An illegal or invalid PIN was specified. Related Information Intrinsics None Commands None Manuals Process Management Programmer's Guide (32650-90023)


MPE/iX 5.0 Documentation