HP-UX Reference (11i v2 07/12) - 2 System Calls (vol 5)

r
rtsched(2) rtsched(2)
sched_setparam()
[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 parame-
ters 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()
[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()
[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
contained 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()
[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) {
perror("sched_get_priority_max() failed");
exit(1);
}
param.sched_priority = maxpri;
if (sched_setscheduler(getpid(), SCHED_FIFO, &param) == -1) {
perror("sched_setscheduler() failed");
exit(1);
}
HP-UX 11i Version 2: December 2007 Update 7 Hewlett-Packard Company 335