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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [doc/] [html/] [ref/] [posix-execution-scheduling.html] - Diff between revs 28 and 174

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 28 Rev 174
<!-- Copyright (C) 2003 Red Hat, Inc.                                -->
<!-- Copyright (C) 2003 Red Hat, Inc.                                -->
<!-- This material may be distributed only subject to the terms      -->
<!-- This material may be distributed only subject to the terms      -->
<!-- and conditions set forth in the Open Publication License, v1.0  -->
<!-- and conditions set forth in the Open Publication License, v1.0  -->
<!-- or later (the latest version is presently available at          -->
<!-- or later (the latest version is presently available at          -->
<!-- http://www.opencontent.org/openpub/).                           -->
<!-- http://www.opencontent.org/openpub/).                           -->
<!-- Distribution of the work or derivative of the work in any       -->
<!-- Distribution of the work or derivative of the work in any       -->
<!-- standard (paper) book form is prohibited unless prior           -->
<!-- standard (paper) book form is prohibited unless prior           -->
<!-- permission is obtained from the copyright holder.               -->
<!-- permission is obtained from the copyright holder.               -->
<HTML
<HTML
><HEAD
><HEAD
><TITLE
><TITLE
>Execution Scheduling [POSIX Section 13]</TITLE
>Execution Scheduling [POSIX Section 13]</TITLE
><meta name="MSSmartTagsPreventParsing" content="TRUE">
><meta name="MSSmartTagsPreventParsing" content="TRUE">
<META
<META
NAME="GENERATOR"
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
"><LINK
"><LINK
REL="HOME"
REL="HOME"
TITLE="eCos Reference Manual"
TITLE="eCos Reference Manual"
HREF="ecos-ref.html"><LINK
HREF="ecos-ref.html"><LINK
REL="UP"
REL="UP"
TITLE="POSIX Standard Support"
TITLE="POSIX Standard Support"
HREF="posix-standard-support.html"><LINK
HREF="posix-standard-support.html"><LINK
REL="PREVIOUS"
REL="PREVIOUS"
TITLE="Memory Management [POSIX Section 12]"
TITLE="Memory Management [POSIX Section 12]"
HREF="posix-memory-management.html"><LINK
HREF="posix-memory-management.html"><LINK
REL="NEXT"
REL="NEXT"
TITLE="Clocks and Timers [POSIX Section 14]"
TITLE="Clocks and Timers [POSIX Section 14]"
HREF="posix-clocks-and-timers.html"></HEAD
HREF="posix-clocks-and-timers.html"></HEAD
><BODY
><BODY
CLASS="SECT1"
CLASS="SECT1"
BGCOLOR="#FFFFFF"
BGCOLOR="#FFFFFF"
TEXT="#000000"
TEXT="#000000"
LINK="#0000FF"
LINK="#0000FF"
VLINK="#840084"
VLINK="#840084"
ALINK="#0000FF"
ALINK="#0000FF"
><DIV
><DIV
CLASS="NAVHEADER"
CLASS="NAVHEADER"
><TABLE
><TABLE
SUMMARY="Header navigation table"
SUMMARY="Header navigation table"
WIDTH="100%"
WIDTH="100%"
BORDER="0"
BORDER="0"
CELLPADDING="0"
CELLPADDING="0"
CELLSPACING="0"
CELLSPACING="0"
><TR
><TR
><TH
><TH
COLSPAN="3"
COLSPAN="3"
ALIGN="center"
ALIGN="center"
>eCos Reference Manual</TH
>eCos Reference Manual</TH
></TR
></TR
><TR
><TR
><TD
><TD
WIDTH="10%"
WIDTH="10%"
ALIGN="left"
ALIGN="left"
VALIGN="bottom"
VALIGN="bottom"
><A
><A
HREF="posix-memory-management.html"
HREF="posix-memory-management.html"
ACCESSKEY="P"
ACCESSKEY="P"
>Prev</A
>Prev</A
></TD
></TD
><TD
><TD
WIDTH="80%"
WIDTH="80%"
ALIGN="center"
ALIGN="center"
VALIGN="bottom"
VALIGN="bottom"
>Chapter 31. POSIX Standard Support</TD
>Chapter 31. POSIX Standard Support</TD
><TD
><TD
WIDTH="10%"
WIDTH="10%"
ALIGN="right"
ALIGN="right"
VALIGN="bottom"
VALIGN="bottom"
><A
><A
HREF="posix-clocks-and-timers.html"
HREF="posix-clocks-and-timers.html"
ACCESSKEY="N"
ACCESSKEY="N"
>Next</A
>Next</A
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><HR
><HR
ALIGN="LEFT"
ALIGN="LEFT"
WIDTH="100%"></DIV
WIDTH="100%"></DIV
><DIV
><DIV
CLASS="SECT1"
CLASS="SECT1"
><H1
><H1
CLASS="SECT1"
CLASS="SECT1"
><A
><A
NAME="POSIX-EXECUTION-SCHEDULING">Execution Scheduling &#0091;POSIX Section 13&#0093;</H1
NAME="POSIX-EXECUTION-SCHEDULING">Execution Scheduling &#0091;POSIX Section 13&#0093;</H1
><DIV
><DIV
CLASS="SECT2"
CLASS="SECT2"
><H2
><H2
CLASS="SECT2"
CLASS="SECT2"
><A
><A
NAME="AEN13195">Functions Implemented</H2
NAME="AEN13195">Functions Implemented</H2
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="SCREEN"
CLASS="SCREEN"
>int sched&#0095;yield(void);
>int sched&#0095;yield(void);
int sched&#0095;get&#0095;priority&#0095;max(int policy);
int sched&#0095;get&#0095;priority&#0095;max(int policy);
int sched&#0095;get&#0095;priority&#0095;min(int policy);
int sched&#0095;get&#0095;priority&#0095;min(int policy);
int sched&#0095;rr&#0095;get&#0095;interval(pid&#0095;t pid, struct timespec &#0042;t);
int sched&#0095;rr&#0095;get&#0095;interval(pid&#0095;t pid, struct timespec &#0042;t);
int pthread&#0095;attr&#0095;setscope(pthread&#0095;attr&#0095;t &#0042;attr, int scope);
int pthread&#0095;attr&#0095;setscope(pthread&#0095;attr&#0095;t &#0042;attr, int scope);
int pthread&#0095;attr&#0095;getscope(const pthread&#0095;attr&#0095;t &#0042;attr, int &#0042;scope);
int pthread&#0095;attr&#0095;getscope(const pthread&#0095;attr&#0095;t &#0042;attr, int &#0042;scope);
int pthread&#0095;attr&#0095;setinheritsched(pthread&#0095;attr&#0095;t &#0042;attr, int inherit);
int pthread&#0095;attr&#0095;setinheritsched(pthread&#0095;attr&#0095;t &#0042;attr, int inherit);
int pthread&#0095;attr&#0095;getinheritsched(const pthread&#0095;attr&#0095;t &#0042;attr, int &#0042;inherit);
int pthread&#0095;attr&#0095;getinheritsched(const pthread&#0095;attr&#0095;t &#0042;attr, int &#0042;inherit);
int pthread&#0095;attr&#0095;setschedpolicy(pthread&#0095;attr&#0095;t &#0042;attr, int policy);
int pthread&#0095;attr&#0095;setschedpolicy(pthread&#0095;attr&#0095;t &#0042;attr, int policy);
int pthread&#0095;attr&#0095;getschedpolicy(const pthread&#0095;attr&#0095;t &#0042;attr, int &#0042;policy);
int pthread&#0095;attr&#0095;getschedpolicy(const pthread&#0095;attr&#0095;t &#0042;attr, int &#0042;policy);
int pthread&#0095;attr&#0095;setschedparam( pthread&#0095;attr&#0095;t &#0042;attr, const struct sched&#0095;param &#0042;param);
int pthread&#0095;attr&#0095;setschedparam( pthread&#0095;attr&#0095;t &#0042;attr, const struct sched&#0095;param &#0042;param);
int pthread&#0095;attr&#0095;getschedparam( const pthread&#0095;attr&#0095;t &#0042;attr,
int pthread&#0095;attr&#0095;getschedparam( const pthread&#0095;attr&#0095;t &#0042;attr,
                                struct sched&#0095;param &#0042;param);
                                struct sched&#0095;param &#0042;param);
int pthread&#0095;setschedparam(pthread&#0095;t thread, int policy,
int pthread&#0095;setschedparam(pthread&#0095;t thread, int policy,
                          const struct sched&#0095;param &#0042;param);
                          const struct sched&#0095;param &#0042;param);
int pthread&#0095;getschedparam(pthread&#0095;t thread, int &#0042;policy,
int pthread&#0095;getschedparam(pthread&#0095;t thread, int &#0042;policy,
                          struct sched&#0095;param &#0042;param);
                          struct sched&#0095;param &#0042;param);
int pthread&#0095;mutexattr&#0095;setprotocol( pthread&#0095;mutexattr&#0095;t &#0042;attr,
int pthread&#0095;mutexattr&#0095;setprotocol( pthread&#0095;mutexattr&#0095;t &#0042;attr,
                                   int protocol);
                                   int protocol);
int pthread&#0095;mutexattr&#0095;getprotocol( pthread&#0095;mutexattr&#0095;t &#0042;attr,
int pthread&#0095;mutexattr&#0095;getprotocol( pthread&#0095;mutexattr&#0095;t &#0042;attr,
                                   int &#0042;protocol);
                                   int &#0042;protocol);
int pthread&#0095;mutexattr&#0095;setprioceiling( pthread&#0095;mutexattr&#0095;t &#0042;attr,
int pthread&#0095;mutexattr&#0095;setprioceiling( pthread&#0095;mutexattr&#0095;t &#0042;attr,
                                      int prioceiling);
                                      int prioceiling);
int pthread&#0095;mutexattr&#0095;getprioceiling( pthread&#0095;mutexattr&#0095;t &#0042;attr,
int pthread&#0095;mutexattr&#0095;getprioceiling( pthread&#0095;mutexattr&#0095;t &#0042;attr,
                                      int &#0042;prioceiling);
                                      int &#0042;prioceiling);
int pthread&#0095;mutex&#0095;setprioceiling( pthread&#0095;mutex&#0095;t &#0042;mutex,
int pthread&#0095;mutex&#0095;setprioceiling( pthread&#0095;mutex&#0095;t &#0042;mutex,
                                  int prioceiling,
                                  int prioceiling,
                                  int &#0042;old&#0095;ceiling);
                                  int &#0042;old&#0095;ceiling);
int pthread&#0095;mutex&#0095;getprioceiling( pthread&#0095;mutex&#0095;t &#0042;mutex,
int pthread&#0095;mutex&#0095;getprioceiling( pthread&#0095;mutex&#0095;t &#0042;mutex,
                                  int &#0042;prioceiling);</PRE
                                  int &#0042;prioceiling);</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
></DIV
></DIV
><DIV
><DIV
CLASS="SECT2"
CLASS="SECT2"
><H2
><H2
CLASS="SECT2"
CLASS="SECT2"
><A
><A
NAME="AEN13198">Functions Omitted</H2
NAME="AEN13198">Functions Omitted</H2
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="SCREEN"
CLASS="SCREEN"
>int sched&#0095;setparam(pid&#0095;t pid, const struct sched&#0095;param &#0042;param);
>int sched&#0095;setparam(pid&#0095;t pid, const struct sched&#0095;param &#0042;param);
int sched&#0095;getparam(pid&#0095;t pid, struct sched&#0095;param &#0042;param);
int sched&#0095;getparam(pid&#0095;t pid, struct sched&#0095;param &#0042;param);
int sched&#0095;setscheduler(pid&#0095;t pid, int policy,
int sched&#0095;setscheduler(pid&#0095;t pid, int policy,
                       const struct sched&#0095;param &#0042;param);
                       const struct sched&#0095;param &#0042;param);
int sched&#0095;getscheduler(pid&#0095;t pid);</PRE
int sched&#0095;getscheduler(pid&#0095;t pid);</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
></DIV
></DIV
><DIV
><DIV
CLASS="SECT2"
CLASS="SECT2"
><H2
><H2
CLASS="SECT2"
CLASS="SECT2"
><A
><A
NAME="AEN13201">Notes</H2
NAME="AEN13201">Notes</H2
><P
><P
></P
></P
><UL
><UL
><LI
><LI
><P
><P
>         The functions <SPAN
>         The functions <SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>sched&#0095;setparam()</I
>sched&#0095;setparam()</I
></SPAN
></SPAN
>,
>,
          <SPAN
          <SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>sched&#0095;getparam()</I
>sched&#0095;getparam()</I
></SPAN
></SPAN
>,
>,
          <SPAN
          <SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>sched&#0095;setscheduler()</I
>sched&#0095;setscheduler()</I
></SPAN
></SPAN
> and
> and
          <SPAN
          <SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>sched&#0095;getscheduler()</I
>sched&#0095;getscheduler()</I
></SPAN
></SPAN
> are present
> are present
          but always return an error.
          but always return an error.
          </P
          </P
></LI
></LI
><LI
><LI
><P
><P
>         The scheduler policy <SPAN
>         The scheduler policy <SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>SCHED&#0095;OTHER</I
>SCHED&#0095;OTHER</I
></SPAN
></SPAN
> is
> is
          equivalent to <SPAN
          equivalent to <SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>SCHED&#0095;RR</I
>SCHED&#0095;RR</I
></SPAN
></SPAN
>.
>.
          </P
          </P
></LI
></LI
><LI
><LI
><P
><P
>         Only <SPAN
>         Only <SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>PTHREAD&#0095;SCOPE&#0095;SYSTEM</I
>PTHREAD&#0095;SCOPE&#0095;SYSTEM</I
></SPAN
></SPAN
>
>
          is supported as a
          is supported as a
          <SPAN
          <SPAN
CLASS="strong"
CLASS="strong"
><B
><B
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>contentionscope</B
>contentionscope</B
></SPAN
></SPAN
>
>
          attribute.
          attribute.
          </P
          </P
></LI
></LI
><LI
><LI
><P
><P
>         The default thread scheduling attributes are:
>         The default thread scheduling attributes are:
          <TABLE
          <TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="SCREEN"
CLASS="SCREEN"
>         contentionscope          PTHREAD&#0095;SCOPE&#0095;SYSTEM
>         contentionscope          PTHREAD&#0095;SCOPE&#0095;SYSTEM
          inheritsched             PTHREAD&#0095;INHERIT&#0095;SCHED
          inheritsched             PTHREAD&#0095;INHERIT&#0095;SCHED
          schedpolicy              SCHED&#0095;OTHER
          schedpolicy              SCHED&#0095;OTHER
          schedparam.sched         0
          schedparam.sched         0
          </PRE
          </PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
>
>
          </P
          </P
></LI
></LI
><LI
><LI
><P
><P
>         Mutex priority inversion protection is controlled by a
>         Mutex priority inversion protection is controlled by a
          number of kernel configuration options.
          number of kernel configuration options.
          If CYGSEM&#0095;KERNEL&#0095;SYNCH&#0095;MUTEX&#0095;PRIORITY&#0095;INVERSION&#0095;PROTOCOL&#0095;INHERIT
          If CYGSEM&#0095;KERNEL&#0095;SYNCH&#0095;MUTEX&#0095;PRIORITY&#0095;INVERSION&#0095;PROTOCOL&#0095;INHERIT
          is defined then
          is defined then
          &#0123;&#0095;POSIX&#0095;THREAD&#0095;PRIO&#0095;INHERIT&#0125;
          &#0123;&#0095;POSIX&#0095;THREAD&#0095;PRIO&#0095;INHERIT&#0125;
          will be defined and PTHREAD&#0095;PRIO&#0095;INHERIT may
          will be defined and PTHREAD&#0095;PRIO&#0095;INHERIT may
          be set as the protocol in a
          be set as the protocol in a
          <SPAN
          <SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>pthread&#0095;mutexattr&#0095;t</I
>pthread&#0095;mutexattr&#0095;t</I
></SPAN
></SPAN
>
>
          object.
          object.
          If CYGSEM&#0095;KERNEL&#0095;SYNCH&#0095;MUTEX&#0095;PRIORITY&#0095;INVERSION&#0095;PROTOCOL&#0095;CEILING
          If CYGSEM&#0095;KERNEL&#0095;SYNCH&#0095;MUTEX&#0095;PRIORITY&#0095;INVERSION&#0095;PROTOCOL&#0095;CEILING
          is defined then
          is defined then
          &#0123;&#0095;POSIX&#0095;THREAD&#0095;PRIO&#0095;PROTECT&#0125;
          &#0123;&#0095;POSIX&#0095;THREAD&#0095;PRIO&#0095;PROTECT&#0125;
          will be defined and PTHREAD&#0095;PRIO&#0095;PROTECT may
          will be defined and PTHREAD&#0095;PRIO&#0095;PROTECT may
          be set as the protocol in a
          be set as the protocol in a
          <SPAN
          <SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>pthread&#0095;mutexattr&#0095;t</I
>pthread&#0095;mutexattr&#0095;t</I
></SPAN
></SPAN
> object.
> object.
          </P
          </P
></LI
></LI
><LI
><LI
><P
><P
>         The default attribute values set by
>         The default attribute values set by
          <SPAN
          <SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>pthread&#0095;mutexattr&#0095;init()</I
>pthread&#0095;mutexattr&#0095;init()</I
></SPAN
></SPAN
>
>
          is to set the protocol attribute to
          is to set the protocol attribute to
          PTHREAD&#0095;PRIO&#0095;NONE and the prioceiling
          PTHREAD&#0095;PRIO&#0095;NONE and the prioceiling
          attribute to zero.
          attribute to zero.
          </P
          </P
></LI
></LI
></UL
></UL
></DIV
></DIV
></DIV
></DIV
><DIV
><DIV
CLASS="NAVFOOTER"
CLASS="NAVFOOTER"
><HR
><HR
ALIGN="LEFT"
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
SUMMARY="Footer navigation table"
WIDTH="100%"
WIDTH="100%"
BORDER="0"
BORDER="0"
CELLPADDING="0"
CELLPADDING="0"
CELLSPACING="0"
CELLSPACING="0"
><TR
><TR
><TD
><TD
WIDTH="33%"
WIDTH="33%"
ALIGN="left"
ALIGN="left"
VALIGN="top"
VALIGN="top"
><A
><A
HREF="posix-memory-management.html"
HREF="posix-memory-management.html"
ACCESSKEY="P"
ACCESSKEY="P"
>Prev</A
>Prev</A
></TD
></TD
><TD
><TD
WIDTH="34%"
WIDTH="34%"
ALIGN="center"
ALIGN="center"
VALIGN="top"
VALIGN="top"
><A
><A
HREF="ecos-ref.html"
HREF="ecos-ref.html"
ACCESSKEY="H"
ACCESSKEY="H"
>Home</A
>Home</A
></TD
></TD
><TD
><TD
WIDTH="33%"
WIDTH="33%"
ALIGN="right"
ALIGN="right"
VALIGN="top"
VALIGN="top"
><A
><A
HREF="posix-clocks-and-timers.html"
HREF="posix-clocks-and-timers.html"
ACCESSKEY="N"
ACCESSKEY="N"
>Next</A
>Next</A
></TD
></TD
></TR
></TR
><TR
><TR
><TD
><TD
WIDTH="33%"
WIDTH="33%"
ALIGN="left"
ALIGN="left"
VALIGN="top"
VALIGN="top"
>Memory Management &#0091;POSIX Section 12&#0093;</TD
>Memory Management &#0091;POSIX Section 12&#0093;</TD
><TD
><TD
WIDTH="34%"
WIDTH="34%"
ALIGN="center"
ALIGN="center"
VALIGN="top"
VALIGN="top"
><A
><A
HREF="posix-standard-support.html"
HREF="posix-standard-support.html"
ACCESSKEY="U"
ACCESSKEY="U"
>Up</A
>Up</A
></TD
></TD
><TD
><TD
WIDTH="33%"
WIDTH="33%"
ALIGN="right"
ALIGN="right"
VALIGN="top"
VALIGN="top"
>Clocks and Timers &#0091;POSIX Section 14&#0093;</TD
>Clocks and Timers &#0091;POSIX Section 14&#0093;</TD
></TR
></TR
></TABLE
></TABLE
></DIV
></DIV
></BODY
></BODY
></HTML
></HTML
 
 

powered by: WebSVN 2.1.0

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