1 <!-- 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. -->
12 >Execution Scheduling [POSIX Section 13]</TITLE
13 ><meta name="MSSmartTagsPreventParsing" content="TRUE">
16 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
19 TITLE="eCos Reference Manual"
20 HREF="ecos-ref.html"><LINK
22 TITLE="POSIX Standard Support"
23 HREF="posix-standard-support.html"><LINK
25 TITLE="Memory Management [POSIX Section 12]"
26 HREF="posix-memory-management.html"><LINK
28 TITLE="Clocks and Timers [POSIX Section 14]"
29 HREF="posix-clocks-and-timers.html"></HEAD
40 SUMMARY="Header navigation table"
49 >eCos Reference Manual</TH
57 HREF="posix-memory-management.html"
65 >Chapter 31. POSIX Standard Support</TD
71 HREF="posix-clocks-and-timers.html"
85 NAME="POSIX-EXECUTION-SCHEDULING">Execution Scheduling [POSIX Section 13]</H1
91 NAME="AEN13195">Functions Implemented</H2
100 >int sched_yield(void);
101 int sched_get_priority_max(int policy);
102 int sched_get_priority_min(int policy);
103 int sched_rr_get_interval(pid_t pid, struct timespec *t);
104 int pthread_attr_setscope(pthread_attr_t *attr, int scope);
105 int pthread_attr_getscope(const pthread_attr_t *attr, int *scope);
106 int pthread_attr_setinheritsched(pthread_attr_t *attr, int inherit);
107 int pthread_attr_getinheritsched(const pthread_attr_t *attr, int *inherit);
108 int pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy);
109 int pthread_attr_getschedpolicy(const pthread_attr_t *attr, int *policy);
110 int pthread_attr_setschedparam( pthread_attr_t *attr, const struct sched_param *param);
111 int pthread_attr_getschedparam( const pthread_attr_t *attr,
112 struct sched_param *param);
113 int pthread_setschedparam(pthread_t thread, int policy,
114 const struct sched_param *param);
115 int pthread_getschedparam(pthread_t thread, int *policy,
116 struct sched_param *param);
117 int pthread_mutexattr_setprotocol( pthread_mutexattr_t *attr,
119 int pthread_mutexattr_getprotocol( pthread_mutexattr_t *attr,
120 int *protocol);
121 int pthread_mutexattr_setprioceiling( pthread_mutexattr_t *attr,
123 int pthread_mutexattr_getprioceiling( pthread_mutexattr_t *attr,
124 int *prioceiling);
125 int pthread_mutex_setprioceiling( pthread_mutex_t *mutex,
127 int *old_ceiling);
128 int pthread_mutex_getprioceiling( pthread_mutex_t *mutex,
129 int *prioceiling);</PRE
139 NAME="AEN13198">Functions Omitted</H2
148 >int sched_setparam(pid_t pid, const struct sched_param *param);
149 int sched_getparam(pid_t pid, struct sched_param *param);
150 int sched_setscheduler(pid_t pid, int policy,
151 const struct sched_param *param);
152 int sched_getscheduler(pid_t pid);</PRE
162 NAME="AEN13201">Notes</H2
168 > The functions <SPAN
172 >sched_setparam()</I
179 >sched_getparam()</I
186 >sched_setscheduler()</I
193 >sched_getscheduler()</I
196 but always return an error.
201 > The scheduler policy <SPAN
205 >SCHED_OTHER</I
223 >PTHREAD_SCOPE_SYSTEM</I
239 > The default thread scheduling attributes are:
248 > contentionscope PTHREAD_SCOPE_SYSTEM
249 inheritsched PTHREAD_INHERIT_SCHED
250 schedpolicy SCHED_OTHER
261 > Mutex priority inversion protection is controlled by a
262 number of kernel configuration options.
263 If CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_INHERIT
265 {_POSIX_THREAD_PRIO_INHERIT}
266 will be defined and PTHREAD_PRIO_INHERIT may
267 be set as the protocol in a
272 >pthread_mutexattr_t</I
276 If CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_CEILING
278 {_POSIX_THREAD_PRIO_PROTECT}
279 will be defined and PTHREAD_PRIO_PROTECT may
280 be set as the protocol in a
285 >pthread_mutexattr_t</I
292 > The default attribute values set by
297 >pthread_mutexattr_init()</I
300 is to set the protocol attribute to
301 PTHREAD_PRIO_NONE and the prioceiling
313 SUMMARY="Footer navigation table"
324 HREF="posix-memory-management.html"
342 HREF="posix-clocks-and-timers.html"
352 >Memory Management [POSIX Section 12]</TD
358 HREF="posix-standard-support.html"
366 >Clocks and Timers [POSIX Section 14]</TD