[Previous]
[Contents]
[Next]

sched_getparam()

get the current priority of a process

Synopsis:

#include <sys/sched.h>
int sched_getparam( pid_t pid,
                    struct sched_param *param );

Description:

The sched_getparam() function gets the current priority of the process specified by pid (or the current process if pid is zero), and puts it in the sched_priority member of the sched_param structure pointed to by param.

Returns:

0
Success
-1
An error occurred. errno is set to indicate the error.

Errors:

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

Classification:

POSIX 1003.4

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

See also:

errno, getprio(), sched_getscheduler(), sched_setparam(), sched_setscheduler(), sched_yield(), setprio(), qnx_scheduler()


[Previous]
[Contents]
[Next]