The Single UNIX ® Specification, Version 2
Copyright © 1997 The Open Group


sched.h - execution scheduling (REALTIME)


#include <sched.h>


The <sched.h> header defines the sched_param structure, which contains the scheduling parameters required for implementation of each supported scheduling policy. This structure contains at least the following member:

int    sched_priority    process execution scheduling priority

Each process is controlled by an associated scheduling policy and priority. Associated with each policy is a priority range. Each policy definition specifies the minimum priority range for that policy. The priority ranges for each policy may overlap the priority ranges of other policies.

Three scheduling policies are defined; others may be defined by the implementation. The three standard policies are indicated by the values of the following symbolic constants:

First in-first out (FIFO) scheduling policy.
Round robin scheduling policy.
Another scheduling policy.

The values of these constants are distinct.

The following are declared as functions and may also be declared as macros. Function prototypes must be provided for use with an ISO C compiler.

int    sched_get_priority_max(int);
int    sched_get_priority_min(int);
int    sched_getparam(pid_t, struct sched_param *);
int    sched_getscheduler(pid_t);
int    sched_rr_get_interval(pid_t, struct timespec *);
int    sched_setparam(pid_t, const struct sched_param *);
int    sched_setscheduler(pid_t, int, const struct sched_param *);
int    sched_yield(void);

Inclusion of the <sched.h> header will make visible symbols defined in the header <time.h>.







UNIX ® is a registered Trademark of The Open Group.
Copyright © 1997 The Open Group
[ Main Index | XSH | XCU | XBD | XCURSES | XNS ]