rtsched.2 (2010 09)

r
rtsched(2) rtsched(2)
ERRORS
If the functions fail, errno is set to one of the following values.
sched_setparam()
[EACCES] The target process could not be accessed due to compartmental restrictions.
[EFAULT] The param argument points to an invalid address.
[EINVAL] One or more of the requested scheduling parameters is outside the range defined for
the scheduling policy of the specified pid.
[ENOSYS] The function is not supported by this implementation.
[EPERM] The requesting process does not have permission to set the scheduling parameters
for the specified process, or does not have the
RTSCHED privilege to invoke
sched_setparam()
.
[ESRCH] No process can be found corresponding to that specified by pid .
sched_getparam()
[EACCES] The target process could not be accessed due to compartmental restrictions.
[EFAULT] The param argument points to an invalid address.
[ENOSYS] The function is not supported by this implementation.
[ESRCH] No process can be found corresponding to that specified by pid .
sched_setscheduler()
[EACCES] The target process could not be accessed due to compartmental restrictions.
[EFAULT] The param argument points to an invalid address.
[EINVAL] The value of the policy parameter is invalid, or one or more of the parameters con-
tained in param is outside the valid range for the specified scheduling policy.
[ENOSYS] The function is not supported by this implementation.
[EPERM] The requesting process does not have permission to set the scheduling policy of the
specified process.
[ESRCH] No process can be found corresponding to that specified by pid .
sched_getscheduler()
[EACCES] The target process could not be accessed due to compartmental restrictions.
[ENOSYS] The function is not supported by this implementation.
[ESRCH] No process can be found corresponding to that specified by pid .
sched_yield()
[ENOSYS] The function is not supported by this implementation.
sched_get_priority_max(), sched_get_priority_min()
[EINVAL] The value of the policy parameter does not represent a defined scheduling policy.
[ENOSYS] The function is not supported by this implementation.
sched_rr_get_interval()
[ENOSYS] The function is not supported by this implementation.
[ESRCH] No process can be found corresponding to that specified by pid .
EXAMPLES
Change the calling process to use the strongest
FIFO priority:
#include <sched.h>
struct sched_param param;
int maxpri;
maxpri = sched_get_priority_max(SCHED_FIFO);
if (maxpri == -1) {
HP-UX 11i Version 3: September 2010 7 Hewlett-Packard Company 7