]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man0p/sched.h.0p
Import of man-pages 1.70
[thirdparty/man-pages.git] / man0p / sched.h.0p
1 .\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
2 .TH "<sched.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
3 .\" <sched.h>
4 .SH NAME
5 sched.h \- execution scheduling (\fBREALTIME\fP)
6 .SH SYNOPSIS
7 .LP
8 \fB#include <sched.h> \fP
9 .SH DESCRIPTION
10 .LP
11 The \fI<sched.h>\fP header shall define the \fBsched_param\fP structure,
12 which contains the scheduling parameters
13 required for implementation of each supported scheduling policy. This
14 structure shall contain at least the following member:
15 .sp
16 .RS
17 .nf
18
19 \fBint sched_priority \fP Process execution scheduling priority. \fB
20 \fP
21 .fi
22 .RE
23 .LP
24 In addition, if _POSIX_SPORADIC_SERVER or _POSIX_THREAD_SPORADIC_SERVER
25 is defined, the \fBsched_param\fP structure defined in
26 \fI<sched.h>\fP shall contain the following members in addition to
27 those specified above:
28 .sp
29 .RS
30 .nf
31
32 \fBint sched_ss_low_priority\fP Low scheduling priority for \fB
33 \fP sporadic server. \fB
34 struct timespec sched_ss_repl_period \fP Replenishment period for \fB
35 \fP sporadic server. \fB
36 struct timespec sched_ss_init_budget \fP Initial budget for sporadic server. \fB
37 int sched_ss_max_repl \fP Maximum pending replenishments for \fB
38 \fP sporadic server. \fB
39 \fP
40 .fi
41 .RE
42 .LP
43 Each process is controlled by an associated scheduling policy and
44 priority. Associated with each policy is a priority range.
45 Each policy definition specifies the minimum priority range for that
46 policy. The priority ranges for each policy may overlap the
47 priority ranges of other policies.
48 .LP
49 Four scheduling policies are defined; others may be defined by the
50 implementation. The four standard policies are indicated by
51 the values of the following symbolic constants:
52 .TP 7
53 SCHED_FIFO
54 First in-first out (FIFO) scheduling policy.
55 .TP 7
56 SCHED_RR
57 Round robin scheduling policy.
58 .TP 7
59 SCHED_SPORADIC
60 Sporadic server scheduling policy.
61 .TP 7
62 SCHED_OTHER
63 Another scheduling policy.
64 .sp
65 .LP
66 The values of these constants are distinct.
67 .LP
68 The following shall be declared as functions and may also be defined
69 as macros. Function prototypes shall be provided.
70 .sp
71 .RS
72 .nf
73
74 \fB
75 int sched_get_priority_max(int);
76 int sched_get_priority_min(int);
77
78 int sched_getparam(pid_t, struct sched_param *);
79 int sched_getscheduler(pid_t);
80
81 int sched_rr_get_interval(pid_t, struct timespec *);
82
83 int sched_setparam(pid_t, const struct sched_param *);
84 int sched_setscheduler(pid_t, int, const struct sched_param *);
85
86 int sched_yield(void);
87
88
89 \fP
90 .fi
91 .RE
92 .LP
93 Inclusion of the \fI<sched.h>\fP header may make visible all symbols
94 from the \fI<time.h>\fP header.
95 .LP
96 \fIThe following sections are informative.\fP
97 .SH APPLICATION USAGE
98 .LP
99 None.
100 .SH RATIONALE
101 .LP
102 None.
103 .SH FUTURE DIRECTIONS
104 .LP
105 None.
106 .SH SEE ALSO
107 .LP
108 \fI<time.h>\fP
109 .SH COPYRIGHT
110 Portions of this text are reprinted and reproduced in electronic form
111 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
112 -- Portable Operating System Interface (POSIX), The Open Group Base
113 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
114 Electrical and Electronics Engineers, Inc and The Open Group. In the
115 event of any discrepancy between this version and the original IEEE and
116 The Open Group Standard, the original IEEE and The Open Group Standard
117 is the referee document. The original Standard can be obtained online at
118 http://www.opengroup.org/unix/online.html .