Gets scheduling parameters.
Standard C Library (libc.a)
The sched_getparam subroutine returns the scheduling parameters of a process specified by the pid parameter in the sched_param structure.
If a process specified by the pid parameter exists, and if the calling process has permission, the scheduling parameters for the process whose process ID is equal to the value of the pid parameter are returned.
If the pid parameter is zero, the scheduling parameters for the calling process are returned.
Item | Description |
---|---|
pid | Specifies the process for which the scheduling parameters are retrieved. |
param | Points to the sched_param structure. |
Upon successful completion, the sched_getparam subroutine returns zero. If the sched_getparam subroutine is unsuccessful, -1 is returned and errno is set to indicate the error.
Item | Description |
---|---|
EINVAL | The param parameter is null or a bad address. |
ENOTSUP | This interface does not support processes capable of checkpoint. |
EPERM | The requesting process does not have permission to obtain the scheduling parameters 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. |