OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [doc/] [html/] [ref/] [posix-execution-scheduling.html] - Blame information for rev 664

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 28 unneback
<!-- Copyright (C) 2003 Red Hat, Inc.                                -->
2
<!-- This material may be distributed only subject to the terms      -->
3
<!-- and conditions set forth in the Open Publication License, v1.0  -->
4
<!-- or later (the latest version is presently available at          -->
5
<!-- http://www.opencontent.org/openpub/).                           -->
6
<!-- Distribution of the work or derivative of the work in any       -->
7
<!-- standard (paper) book form is prohibited unless prior           -->
8
<!-- permission is obtained from the copyright holder.               -->
9
<HTML
10
><HEAD
11
><TITLE
12
>Execution Scheduling [POSIX Section 13]</TITLE
13
><meta name="MSSmartTagsPreventParsing" content="TRUE">
14
<META
15
NAME="GENERATOR"
16
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
17
"><LINK
18
REL="HOME"
19
TITLE="eCos Reference Manual"
20
HREF="ecos-ref.html"><LINK
21
REL="UP"
22
TITLE="POSIX Standard Support"
23
HREF="posix-standard-support.html"><LINK
24
REL="PREVIOUS"
25
TITLE="Memory Management [POSIX Section 12]"
26
HREF="posix-memory-management.html"><LINK
27
REL="NEXT"
28
TITLE="Clocks and Timers [POSIX Section 14]"
29
HREF="posix-clocks-and-timers.html"></HEAD
30
><BODY
31
CLASS="SECT1"
32
BGCOLOR="#FFFFFF"
33
TEXT="#000000"
34
LINK="#0000FF"
35
VLINK="#840084"
36
ALINK="#0000FF"
37
><DIV
38
CLASS="NAVHEADER"
39
><TABLE
40
SUMMARY="Header navigation table"
41
WIDTH="100%"
42
BORDER="0"
43
CELLPADDING="0"
44
CELLSPACING="0"
45
><TR
46
><TH
47
COLSPAN="3"
48
ALIGN="center"
49
>eCos Reference Manual</TH
50
></TR
51
><TR
52
><TD
53
WIDTH="10%"
54
ALIGN="left"
55
VALIGN="bottom"
56
><A
57
HREF="posix-memory-management.html"
58
ACCESSKEY="P"
59
>Prev</A
60
></TD
61
><TD
62
WIDTH="80%"
63
ALIGN="center"
64
VALIGN="bottom"
65
>Chapter 31. POSIX Standard Support</TD
66
><TD
67
WIDTH="10%"
68
ALIGN="right"
69
VALIGN="bottom"
70
><A
71
HREF="posix-clocks-and-timers.html"
72
ACCESSKEY="N"
73
>Next</A
74
></TD
75
></TR
76
></TABLE
77
><HR
78
ALIGN="LEFT"
79
WIDTH="100%"></DIV
80
><DIV
81
CLASS="SECT1"
82
><H1
83
CLASS="SECT1"
84
><A
85
NAME="POSIX-EXECUTION-SCHEDULING">Execution Scheduling &#0091;POSIX Section 13&#0093;</H1
86
><DIV
87
CLASS="SECT2"
88
><H2
89
CLASS="SECT2"
90
><A
91
NAME="AEN13195">Functions Implemented</H2
92
><TABLE
93
BORDER="5"
94
BGCOLOR="#E0E0F0"
95
WIDTH="70%"
96
><TR
97
><TD
98
><PRE
99
CLASS="SCREEN"
100
>int sched&#0095;yield(void);
101
int sched&#0095;get&#0095;priority&#0095;max(int policy);
102
int sched&#0095;get&#0095;priority&#0095;min(int policy);
103
int sched&#0095;rr&#0095;get&#0095;interval(pid&#0095;t pid, struct timespec &#0042;t);
104
int pthread&#0095;attr&#0095;setscope(pthread&#0095;attr&#0095;t &#0042;attr, int scope);
105
int pthread&#0095;attr&#0095;getscope(const pthread&#0095;attr&#0095;t &#0042;attr, int &#0042;scope);
106
int pthread&#0095;attr&#0095;setinheritsched(pthread&#0095;attr&#0095;t &#0042;attr, int inherit);
107
int pthread&#0095;attr&#0095;getinheritsched(const pthread&#0095;attr&#0095;t &#0042;attr, int &#0042;inherit);
108
int pthread&#0095;attr&#0095;setschedpolicy(pthread&#0095;attr&#0095;t &#0042;attr, int policy);
109
int pthread&#0095;attr&#0095;getschedpolicy(const pthread&#0095;attr&#0095;t &#0042;attr, int &#0042;policy);
110
int pthread&#0095;attr&#0095;setschedparam( pthread&#0095;attr&#0095;t &#0042;attr, const struct sched&#0095;param &#0042;param);
111
int pthread&#0095;attr&#0095;getschedparam( const pthread&#0095;attr&#0095;t &#0042;attr,
112
                                struct sched&#0095;param &#0042;param);
113
int pthread&#0095;setschedparam(pthread&#0095;t thread, int policy,
114
                          const struct sched&#0095;param &#0042;param);
115
int pthread&#0095;getschedparam(pthread&#0095;t thread, int &#0042;policy,
116
                          struct sched&#0095;param &#0042;param);
117
int pthread&#0095;mutexattr&#0095;setprotocol( pthread&#0095;mutexattr&#0095;t &#0042;attr,
118
                                   int protocol);
119
int pthread&#0095;mutexattr&#0095;getprotocol( pthread&#0095;mutexattr&#0095;t &#0042;attr,
120
                                   int &#0042;protocol);
121
int pthread&#0095;mutexattr&#0095;setprioceiling( pthread&#0095;mutexattr&#0095;t &#0042;attr,
122
                                      int prioceiling);
123
int pthread&#0095;mutexattr&#0095;getprioceiling( pthread&#0095;mutexattr&#0095;t &#0042;attr,
124
                                      int &#0042;prioceiling);
125
int pthread&#0095;mutex&#0095;setprioceiling( pthread&#0095;mutex&#0095;t &#0042;mutex,
126
                                  int prioceiling,
127
                                  int &#0042;old&#0095;ceiling);
128
int pthread&#0095;mutex&#0095;getprioceiling( pthread&#0095;mutex&#0095;t &#0042;mutex,
129
                                  int &#0042;prioceiling);</PRE
130
></TD
131
></TR
132
></TABLE
133
></DIV
134
><DIV
135
CLASS="SECT2"
136
><H2
137
CLASS="SECT2"
138
><A
139
NAME="AEN13198">Functions Omitted</H2
140
><TABLE
141
BORDER="5"
142
BGCOLOR="#E0E0F0"
143
WIDTH="70%"
144
><TR
145
><TD
146
><PRE
147
CLASS="SCREEN"
148
>int sched&#0095;setparam(pid&#0095;t pid, const struct sched&#0095;param &#0042;param);
149
int sched&#0095;getparam(pid&#0095;t pid, struct sched&#0095;param &#0042;param);
150
int sched&#0095;setscheduler(pid&#0095;t pid, int policy,
151
                       const struct sched&#0095;param &#0042;param);
152
int sched&#0095;getscheduler(pid&#0095;t pid);</PRE
153
></TD
154
></TR
155
></TABLE
156
></DIV
157
><DIV
158
CLASS="SECT2"
159
><H2
160
CLASS="SECT2"
161
><A
162
NAME="AEN13201">Notes</H2
163
><P
164
></P
165
><UL
166
><LI
167
><P
168
>         The functions <SPAN
169
CLASS="emphasis"
170
><I
171
CLASS="EMPHASIS"
172
>sched&#0095;setparam()</I
173
></SPAN
174
>,
175
          <SPAN
176
CLASS="emphasis"
177
><I
178
CLASS="EMPHASIS"
179
>sched&#0095;getparam()</I
180
></SPAN
181
>,
182
          <SPAN
183
CLASS="emphasis"
184
><I
185
CLASS="EMPHASIS"
186
>sched&#0095;setscheduler()</I
187
></SPAN
188
> and
189
          <SPAN
190
CLASS="emphasis"
191
><I
192
CLASS="EMPHASIS"
193
>sched&#0095;getscheduler()</I
194
></SPAN
195
> are present
196
          but always return an error.
197
          </P
198
></LI
199
><LI
200
><P
201
>         The scheduler policy <SPAN
202
CLASS="emphasis"
203
><I
204
CLASS="EMPHASIS"
205
>SCHED&#0095;OTHER</I
206
></SPAN
207
> is
208
          equivalent to <SPAN
209
CLASS="emphasis"
210
><I
211
CLASS="EMPHASIS"
212
>SCHED&#0095;RR</I
213
></SPAN
214
>.
215
          </P
216
></LI
217
><LI
218
><P
219
>         Only <SPAN
220
CLASS="emphasis"
221
><I
222
CLASS="EMPHASIS"
223
>PTHREAD&#0095;SCOPE&#0095;SYSTEM</I
224
></SPAN
225
>
226
          is supported as a
227
          <SPAN
228
CLASS="strong"
229
><B
230
CLASS="EMPHASIS"
231
>contentionscope</B
232
></SPAN
233
>
234
          attribute.
235
          </P
236
></LI
237
><LI
238
><P
239
>         The default thread scheduling attributes are:
240
          <TABLE
241
BORDER="5"
242
BGCOLOR="#E0E0F0"
243
WIDTH="70%"
244
><TR
245
><TD
246
><PRE
247
CLASS="SCREEN"
248
>         contentionscope          PTHREAD&#0095;SCOPE&#0095;SYSTEM
249
          inheritsched             PTHREAD&#0095;INHERIT&#0095;SCHED
250
          schedpolicy              SCHED&#0095;OTHER
251
          schedparam.sched         0
252
          </PRE
253
></TD
254
></TR
255
></TABLE
256
>
257
          </P
258
></LI
259
><LI
260
><P
261
>         Mutex priority inversion protection is controlled by a
262
          number of kernel configuration options.
263
          If CYGSEM&#0095;KERNEL&#0095;SYNCH&#0095;MUTEX&#0095;PRIORITY&#0095;INVERSION&#0095;PROTOCOL&#0095;INHERIT
264
          is defined then
265
          &#0123;&#0095;POSIX&#0095;THREAD&#0095;PRIO&#0095;INHERIT&#0125;
266
          will be defined and PTHREAD&#0095;PRIO&#0095;INHERIT may
267
          be set as the protocol in a
268
          <SPAN
269
CLASS="emphasis"
270
><I
271
CLASS="EMPHASIS"
272
>pthread&#0095;mutexattr&#0095;t</I
273
></SPAN
274
>
275
          object.
276
          If CYGSEM&#0095;KERNEL&#0095;SYNCH&#0095;MUTEX&#0095;PRIORITY&#0095;INVERSION&#0095;PROTOCOL&#0095;CEILING
277
          is defined then
278
          &#0123;&#0095;POSIX&#0095;THREAD&#0095;PRIO&#0095;PROTECT&#0125;
279
          will be defined and PTHREAD&#0095;PRIO&#0095;PROTECT may
280
          be set as the protocol in a
281
          <SPAN
282
CLASS="emphasis"
283
><I
284
CLASS="EMPHASIS"
285
>pthread&#0095;mutexattr&#0095;t</I
286
></SPAN
287
> object.
288
          </P
289
></LI
290
><LI
291
><P
292
>         The default attribute values set by
293
          <SPAN
294
CLASS="emphasis"
295
><I
296
CLASS="EMPHASIS"
297
>pthread&#0095;mutexattr&#0095;init()</I
298
></SPAN
299
>
300
          is to set the protocol attribute to
301
          PTHREAD&#0095;PRIO&#0095;NONE and the prioceiling
302
          attribute to zero.
303
          </P
304
></LI
305
></UL
306
></DIV
307
></DIV
308
><DIV
309
CLASS="NAVFOOTER"
310
><HR
311
ALIGN="LEFT"
312
WIDTH="100%"><TABLE
313
SUMMARY="Footer navigation table"
314
WIDTH="100%"
315
BORDER="0"
316
CELLPADDING="0"
317
CELLSPACING="0"
318
><TR
319
><TD
320
WIDTH="33%"
321
ALIGN="left"
322
VALIGN="top"
323
><A
324
HREF="posix-memory-management.html"
325
ACCESSKEY="P"
326
>Prev</A
327
></TD
328
><TD
329
WIDTH="34%"
330
ALIGN="center"
331
VALIGN="top"
332
><A
333
HREF="ecos-ref.html"
334
ACCESSKEY="H"
335
>Home</A
336
></TD
337
><TD
338
WIDTH="33%"
339
ALIGN="right"
340
VALIGN="top"
341
><A
342
HREF="posix-clocks-and-timers.html"
343
ACCESSKEY="N"
344
>Next</A
345
></TD
346
></TR
347
><TR
348
><TD
349
WIDTH="33%"
350
ALIGN="left"
351
VALIGN="top"
352
>Memory Management &#0091;POSIX Section 12&#0093;</TD
353
><TD
354
WIDTH="34%"
355
ALIGN="center"
356
VALIGN="top"
357
><A
358
HREF="posix-standard-support.html"
359
ACCESSKEY="U"
360
>Up</A
361
></TD
362
><TD
363
WIDTH="33%"
364
ALIGN="right"
365
VALIGN="top"
366
>Clocks and Timers &#0091;POSIX Section 14&#0093;</TD
367
></TR
368
></TABLE
369
></DIV
370
></BODY
371
></HTML
372
>

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.