[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    sched_get_priority_max(3R) manual page Table of Contents

Name

sched_get_priority_max, sched_get_priority_min, sched_rr_get_interval - get scheduling parameter limits

Synopsis

cc [ flag ... ] file ... -lposix4 [ library ... ]

#include <sched.h>

int sched_get_priority_max(int policy);

int sched_get_priority_min(int policy);

int sched_rr_get_interval(pid_t pid, struct timespec *interval);

struct    timespec {
   time_t    tv_sec; /* seconds */

   long    tv_nsec; /* and nanoseconds */

};

MT-Level

MT-Safe

Description

sched_get_priority_max() and sched_get_priority_min() return the appropriate maximum or minimum values, respectively, for the scheduling policy specified by policy.

sched_rr_get_interval() updates the timespec structure referenced by interval to contain the current execution time limit (i.e., time quantum) for the process specified by pid under the SCHED_RR policy. After that time limit expires, when another process at the same priority is ready to execute, a scheduling decision will be made. If pid is zero, the current execution time limit for the calling process is stored in interval.

The value of policy must be one of the scheduling policy values defined in <sched.h>:
SCHED_FIFO, SCHED_RR, or SCHED_OTHER.

Return Values

If successful, sched_get_priority_max() or sched_get_priority_min() returns the appropriate maximum or minimum values, respectively.

If successful, sched_rr_get_interval() returns 0.

If unsuccessful, these functions return -1, and set errno to indicate the error condition.

Errors

EINVAL
The value of policy does not represent a defined scheduling policy.
ENOSYS
sched_get_priority_max(), sched_get_priority_min(),
and sched_rr_get_interval() are not supported by this implementation.
ESRCH
No process can be found corresponding to that specified by pid.

See Also

sched_setparam(3R) , sched_setscheduler(3R)

Bugs

In Solaris 2.5, these functions always return -1 and set errno to ENOSYS, because this release does not support the Priority Scheduling option. It is our intention to provide support for these interfaces in future releases.


Table of Contents