The chpriority callable service changes the scheduling priority of a process, process group, or user.
Operation | Environment |
---|---|
Authorization: | Supervisor or problem state, any PSW key |
Dispatchable unit mode: | Task |
Cross memory mode: | PASN = HASN |
AMODE (BPX1CHP): | 31-bit |
AMODE (BPX41CHP): | 64-bit |
ASC mode: | Primary mode |
Interrupt status: | Enabled for interrupts |
Locks: | Unlocked |
Control parameters: | All parameters must be addressable by the caller and in the primary address space. |
|
AMODE 64 callers use BPX4CHP with the same parameters.
The PRIO_ constants are defined in the BPXYCONS macro.
The name of a fullword that contains a value that indicates the exact process ID, process group ID, or user ID whose priority is to be changed. The Which parameter indicates how this parameter is to be interpreted. If this parameter is interpreted as a process group ID or user ID, all processes with the specified process group ID or user ID are to have their priority changed. A value of zero for this parameter specifies the current process, process group, or user ID.
The CPRIO_ constants are defined in the BPXYCONS macro.
The name of a fullword that contains a value that indicates the priority value that the specific process or group of processes is to be set to or changed by.
The name of a fullword in which the chpriority service returns -1 if it is not successful. If it is successful, the chpriority service returns a value of zero.
Return_code | Explanation |
---|---|
EACCES | The priority is being changed to a lower value, and the current process does not have the appropriate privilege (see Authorization) to do so. |
EPERM | A process was located, but the saved set-user-ID of the calling process does not match the saved set-user-ID of the process whose priority is being changed. |
EINVAL | The value of the Which parameter was not recognized; the value of the Who parameter is not a valid process ID, process group ID or user ID; or the value of the PriorityType parameter is not supported. |
ESRCH | No process could be located using the Which and Who parameter values specified. |
EMVSSAF2ERR | A Security product internal error has occurred. Consult the Reason_code parameter for the exact reason for the error. |
ENOSYS | The system does not support this function. Your installation has chosen not to enable this function. |
The name of a fullword in which the chpriority service stores the reason code. The chpriority service returns Reason_code only if Return_value is -1. Reason_code further qualifies the Return_code value. For the reason codes, see z/OS UNIX System Services Messages and Codes.
There are no restrictions on the use of the chpriority service.
For an example using this callable service, see BPX1CHP (chpriority) example.