⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 posix-execution-scheduling.html

📁 有关ecos2。0介绍了实时嵌入式的结构以及线程调度的实现和内存的管理等
💻 HTML
字号:
<!-- Copyright (C) 2003 Red Hat, Inc.                                --><!-- This material may be distributed only subject to the terms      --><!-- and conditions set forth in the Open Publication License, v1.0  --><!-- or later (the latest version is presently available at          --><!-- http://www.opencontent.org/openpub/).                           --><!-- Distribution of the work or derivative of the work in any       --><!-- standard (paper) book form is prohibited unless prior           --><!-- permission is obtained from the copyright holder.               --><HTML><HEAD><TITLE>Execution Scheduling [POSIX Section 13]</TITLE><meta name="MSSmartTagsPreventParsing" content="TRUE"><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+"><LINKREL="HOME"TITLE="eCos Reference Manual"HREF="ecos-ref.html"><LINKREL="UP"TITLE="POSIX Standard Support"HREF="posix-standard-support.html"><LINKREL="PREVIOUS"TITLE="Memory Management [POSIX Section 12]"HREF="posix-memory-management.html"><LINKREL="NEXT"TITLE="Clocks and Timers [POSIX Section 14]"HREF="posix-clocks-and-timers.html"></HEAD><BODYCLASS="SECT1"BGCOLOR="#FFFFFF"TEXT="#000000"LINK="#0000FF"VLINK="#840084"ALINK="#0000FF"><DIVCLASS="NAVHEADER"><TABLESUMMARY="Header navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">eCos Reference Manual</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="posix-memory-management.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Chapter 31. POSIX Standard Support</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="posix-clocks-and-timers.html"ACCESSKEY="N">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="SECT1"><H1CLASS="SECT1"><ANAME="POSIX-EXECUTION-SCHEDULING">Execution Scheduling &#0091;POSIX Section 13&#0093;</H1><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN13195">Functions Implemented</H2><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="SCREEN">int sched&#0095;yield(void); int sched&#0095;get&#0095;priority&#0095;max(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 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;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;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;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,	                        struct sched&#0095;param &#0042;param); int pthread&#0095;setschedparam(pthread&#0095;t thread, int policy,	                  const struct sched&#0095;param &#0042;param); int pthread&#0095;getschedparam(pthread&#0095;t thread, int &#0042;policy,	                  struct sched&#0095;param &#0042;param); int pthread&#0095;mutexattr&#0095;setprotocol( pthread&#0095;mutexattr&#0095;t &#0042;attr,                                   int protocol);int pthread&#0095;mutexattr&#0095;getprotocol( pthread&#0095;mutexattr&#0095;t &#0042;attr,                                   int &#0042;protocol); int pthread&#0095;mutexattr&#0095;setprioceiling( pthread&#0095;mutexattr&#0095;t &#0042;attr,                                      int prioceiling); int pthread&#0095;mutexattr&#0095;getprioceiling( pthread&#0095;mutexattr&#0095;t &#0042;attr,	                              int &#0042;prioceiling);int pthread&#0095;mutex&#0095;setprioceiling( pthread&#0095;mutex&#0095;t &#0042;mutex,	                          int prioceiling,	                          int &#0042;old&#0095;ceiling); int pthread&#0095;mutex&#0095;getprioceiling( pthread&#0095;mutex&#0095;t &#0042;mutex,                                  int &#0042;prioceiling);</PRE></TD></TR></TABLE></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN13198">Functions Omitted</H2><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="SCREEN">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;setscheduler(pid&#0095;t pid, int policy,	               const struct sched&#0095;param &#0042;param); int sched&#0095;getscheduler(pid&#0095;t pid);</PRE></TD></TR></TABLE></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN13201">Notes</H2><P></P><UL><LI><P>	  The functions <SPANCLASS="emphasis"><ICLASS="EMPHASIS">sched&#0095;setparam()</I></SPAN>, 	  <SPANCLASS="emphasis"><ICLASS="EMPHASIS">sched&#0095;getparam()</I></SPAN>,	  <SPANCLASS="emphasis"><ICLASS="EMPHASIS">sched&#0095;setscheduler()</I></SPAN> and	  <SPANCLASS="emphasis"><ICLASS="EMPHASIS">sched&#0095;getscheduler()</I></SPAN> are present	  but always return an error.	  </P></LI><LI><P>	  The scheduler policy <SPANCLASS="emphasis"><ICLASS="EMPHASIS">SCHED&#0095;OTHER</I></SPAN> is	  equivalent to <SPANCLASS="emphasis"><ICLASS="EMPHASIS">SCHED&#0095;RR</I></SPAN>.	  </P></LI><LI><P>	  Only <SPANCLASS="emphasis"><ICLASS="EMPHASIS">PTHREAD&#0095;SCOPE&#0095;SYSTEM</I></SPAN>	  is supported as a	  <SPANCLASS="strong"><BCLASS="EMPHASIS">contentionscope</B></SPAN>	  attribute.	  </P></LI><LI><P>	  The default thread scheduling attributes are:	  <TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="SCREEN">	  contentionscope          PTHREAD&#0095;SCOPE&#0095;SYSTEM	  inheritsched             PTHREAD&#0095;INHERIT&#0095;SCHED	  schedpolicy              SCHED&#0095;OTHER	  schedparam.sched	   0	  </PRE></TD></TR></TABLE>          </P></LI><LI><P>	  Mutex priority inversion protection is controlled by a	  number of kernel configuration options.	  If CYGSEM&#0095;KERNEL&#0095;SYNCH&#0095;MUTEX&#0095;PRIORITY&#0095;INVERSION&#0095;PROTOCOL&#0095;INHERIT	  is defined then	  &#0123;&#0095;POSIX&#0095;THREAD&#0095;PRIO&#0095;INHERIT&#0125;	  will be defined and PTHREAD&#0095;PRIO&#0095;INHERIT may	  be set as the protocol in a	  <SPANCLASS="emphasis"><ICLASS="EMPHASIS">pthread&#0095;mutexattr&#0095;t</I></SPAN>	  object.	  If CYGSEM&#0095;KERNEL&#0095;SYNCH&#0095;MUTEX&#0095;PRIORITY&#0095;INVERSION&#0095;PROTOCOL&#0095;CEILING	  is defined then	  &#0123;&#0095;POSIX&#0095;THREAD&#0095;PRIO&#0095;PROTECT&#0125;	  will be defined and PTHREAD&#0095;PRIO&#0095;PROTECT may	  be set as the protocol in a	  <SPANCLASS="emphasis"><ICLASS="EMPHASIS">pthread&#0095;mutexattr&#0095;t</I></SPAN> object.          </P></LI><LI><P>	  The default attribute values set by	  <SPANCLASS="emphasis"><ICLASS="EMPHASIS">pthread&#0095;mutexattr&#0095;init()</I></SPAN>	  is to set the protocol attribute to	  PTHREAD&#0095;PRIO&#0095;NONE and the prioceiling	  attribute to zero.	  </P></LI></UL></DIV></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLESUMMARY="Footer navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="posix-memory-management.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="ecos-ref.html"ACCESSKEY="H">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="posix-clocks-and-timers.html"ACCESSKEY="N">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">Memory Management &#0091;POSIX Section 12&#0093;</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="posix-standard-support.html"ACCESSKEY="U">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">Clocks and Timers &#0091;POSIX Section 14&#0093;</TD></TR></TABLE></DIV></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -