Gets the scheduling policy.
Standard C Library (libc.a)
#include <sched.h>
int sched_getscheduler (pid)
pid_t pid;
The sched_getscheduler subroutine returns the scheduling policy of the process specified by the pid parameter.
The values that can be returned by the sched_getscheduler subroutine are defined in the sched.h header file.
Item | Description |
---|---|
pid | Specifies the process for which the scheduling policy is retrieved. |
Upon successful completion, the sched_getscheduler subroutine returns the scheduling policy of the specified process. If unsuccessful it returns -1 and sets errno to indicate the error.
Item | Description |
---|---|
EPERM | The requesting process does not have permission to determine the scheduling policy of the specified process. |
ESRCH | The pid parameter is negative, or no process can be found that corresponds to the one specified by the pid parameter. |
ENOTSUP | This interface does not support processes capable of checkpoint. |