HP-UX Reference (11i v1 00/12) - 2 System Calls (vol 5)

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man2/!!!intro.2
________________________________________________________________
___ ___
r
rtsched(2) rtsched(2)
The threads in different processor sets do not compete with one another for processors based on their
scheduling policy and priority values. The scheduler looks only at threads assigned to a processor’s proces-
sor set to choose the next thread to run. A process with lower scheduling priority in one processor set may
be executing while another process in another processor set with higher scheduling priority is waiting for
the processor resources. This is applicablefor all scheduling policies.
RETURN VALUE
The functions return the following values:
sched_getparam()
sched_rr_get_interval()
sched_setparam()
sched_yield()
0 Successful completion.
-1 Failure. errno is set to indicate the error.
sched_setscheduler()
n Successful completion. n is the former scheduling policy of the specified process.
-1 Failure. The policy and scheduling parameters remain unchanged.
errno is set to indicate the
error.
sched_getscheduler()
n Successful completion. n is the scheduling policy of the specified process.
-1 Failure. errno is set to indicate the error.
sched_get_priority_max()
sched_get_priority_min()
n Successful completion. n is the maximum or minimum value, respectively.
-1 Failure. errno is set to indicate the error.
PRI_HPUX_TO_POSIX()
n Successful completion. n is the the POSIX.4 priority corresponding to pri.
PRI_POSIX_TO_HPUX()
n Successful completion. n is the the HP-UX priority corresponding to pri.
ERRORS
If the functions fail,
errno is set to one of the following values.
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 parameters for
the specified process, or does not have the appropriate 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 con-
tained in param is outside the valid range for the specified scheduling policy.
Section 2270 6 HP-UX Release 11i: December 2000
___
___