sched_rr_get_interval(2) DG/UX 5.4R3.00 sched_rr_get_interval(2)
NAME
sched_rr_get_interval - get the execution timeslice for a process
SYNOPSIS
#include <time.h>
#include <sched.h>
int schedrrgetinterval (pid, *interval)
pidt pid;
struct timespec*interval;
DESCRIPTION
For a process governed by the SCHED_RR scheduling policy (round robin
with a timeslice), use schedrrgetinterval(2) to get the timeslice
interval:
pid is the ID of a process controlled by the SCHED_RR policy. The
value 0 indicates the calling process.
interval
is a pointer to a structure to contain the timeslice
information.
The POSIX-designated structure updated by this routine is shown
below:
struct timespec
{
timet tvsec;
long tvnsec;
};
The time interval is expressed in seconds (tvsec) and nanoseconds
(tvnsec).
This call requires no access to pid.
Note
* This routine is based on POSIX realtime extension document P1003.4
draft 14. It is therefore subject to change.
* Compilation of a source file using this routine requires that
feature macro _POSIX4_DRAFT_SOURCE be defined. This feature macro
is not enabled by any other feature macro, nor does it enable any
other feature macro.
* The compiled routine must be linked to library librte.a.
RETURN VALUE
If successful, schedrrgetinterval returns 0. If unsuccessful, the
routine returns -1 and sets ERRNO to one of the following:
EFAULT The address of interval is bad.
Licensed material--property of copyright holder(s) 1
sched_rr_get_interval(2) DG/UX 5.4R3.00 sched_rr_get_interval(2)
EINVAL Process pid is not under the SCHED_RR policy.
ESRCH Process pid doesn't exist or is negative.
SEE ALSO
schedgetprioritymax(2), schedgetprioritymin(2),
schedsetscheduler(2), schedgetscheduler(2), schedsetparam(2),
schedgetparam(2), schedyield(2).
Licensed material--property of copyright holder(s) 2