[Previous]
[Contents]
[Next]

getprio()

get the priority of a given process

Synopsis:

#include <sys/sched.h>
int getprio( pid_t pid );

Description:

The getprio() function returns the current priority of process pid. If pid is zero, the priority of the calling process is returned.

Returns:

The priority, or -1 if an error occurs, in which case errno is set.

Errors:

EPERM
The calling process doesn't have sufficient privilege to get the priority.
ESRCH
The process pid doesn't exist.

Examples:

See qnx_scheduler().

Classification:

QNX

Safety:
Interrupt handler No
Signal handler Yes, but modifies errno
Thread Yes

See also:

errno, sched_getparam(), sched_getscheduler(), sched_setscheduler(), sched_yield(), setprio(), qnx_scheduler()


[Previous]
[Contents]
[Next]