Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sched_get_priority_max(3R) — SunOS 5.5

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sched_setparam(3R)

sched_setscheduler(3R)

sched_get_priority_max(3R)

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);

structtimespec {
time_ttv_sec;           /∗ seconds ∗/
longtv_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. 

SunOS 5.5  —  Last change: 20 Aug 1993

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026