The Single UNIX ® Specification, Version 2
Copyright © 1997 The Open Group


sched_getparam - get scheduling parameters (REALTIME)


#include <sched.h>

int sched_getparam(pid_t pid, struct sched_param *param);


The sched_getparam() function returns the scheduling parameters of a process specified by pid in the sched_param structure pointed to by param.

If a process specified by pid exists and if the calling process has permission, the scheduling parameters for the process whose process ID is equal to pid will be returned.

If pid is zero, the scheduling parameters for the calling process will be returned. The behaviour of the sched_getparam() function is unspecified if the value of pid is negative.


Upon successful completion, the sched_getparam() function returns zero. If the call to sched_getparam() is unsuccessful, the function returns a value of -1 and sets errno to indicate the error.


The sched_getparam() function will fail if:
The function sched_getparam() is not supported by this implementation.
The requesting process does not have permission to obtain the scheduling parameters of the specified process.
No process can be found corresponding to that specified by pid.








sched_getscheduler(), sched_setparam(), sched_setscheduler(), <sched.h>.


Derived from the POSIX Realtime Extension (1003.1b-1993/1003.1i-1995)

UNIX ® is a registered Trademark of The Open Group.
Copyright © 1997 The Open Group
[ Main Index | XSH | XCU | XBD | XCURSES | XNS ]