Returns the scheduling priority of a process.
Standard C Library (libc.a)
int getpri ( ProcessID)
pid_t ProcessID;
The getpri subroutine returns the scheduling priority of a process.
Item | Description |
---|---|
ProcessID | Specifies the process ID. If this value is 0, the current process scheduling priority is returned. |
Upon successful completion, the getpri subroutine returns the scheduling priority of a thread in the process. Otherwise, a value of -1 is returned and the errno global variable is set to indicate the error.
The getpri subroutine is unsuccessful if one of the following is true:
Item | Description |
---|---|
EPERM | A process was located, but its effective and real user ID did not match that of the process running the getpri subroutine, and the calling process did not have root user authority. |
ESRCH | No process can be found corresponding to that specified by the ProcessID parameter. |