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

📄 posix.sgml

📁 eCos/RedBoot for勤研ARM AnywhereII(4510) 含全部源代码
💻 SGML
📖 第 1 页 / 共 4 页
字号:
	    <para>
	    The <emphasis role="strong">pshared</emphasis> argument to
	    <emphasis>sem&lowbar;init()</emphasis> is not implemented,
	    its value is ignored.
	    </para>
	  </listitem>
	  
	  <listitem>
	    <para>
	    Functions <emphasis>sem&lowbar;open()</emphasis>, 
	    <emphasis>sem&lowbar;close()</emphasis> and
	    <emphasis>sem&lowbar;unlink()</emphasis> are present but
	    always return an error (ENOSYS).
	    </para>
	  </listitem>

	  <listitem>
	    <para>
	    The exact priority inversion protocols supported may be
	    controlled with the
	    &lowbar;POSIX&lowbar;THREAD&lowbar;PRIO&lowbar;INHERIT and
	    &lowbar;POSIX&lowbar;THREAD&lowbar;PRIO&lowbar;PROTECT
	    configuration options.
	    </para>
	  </listitem>
	  
	  <listitem>
	    <para>
	    &lcub;&lowbar;POSIX&lowbar;THREAD&lowbar;PROCESS&lowbar;SHARED&rcub; is
	    not defined, so the 
	    <emphasis role="strong">process-shared</emphasis> mutex
	    and condition variable attributes are not supported, and
	    neither are the functions
	    <emphasis>pthread&lowbar;mutexattr&lowbar;getpshared()</emphasis>,
	    <emphasis>pthread&lowbar;mutexattr&lowbar;setpshared()</emphasis>, 
	    <emphasis>pthread&lowbar;condattr&lowbar;getpshared()</emphasis> and 
	    <emphasis>pthread&lowbar;condattr&lowbar;setpshared()</emphasis>. 
	    </para>
	  </listitem>
	  
	  <listitem>
	  <para>
	    Condition variables do not become bound to a particular
	    mutex when
	    <emphasis>pthread&lowbar;cond&lowbar;wait()</emphasis> is
	    called. Hence different threads may wait on a condition
	    variable with different mutexes. This is at variance with
	    the standard, which requires a condition variable to
	    become (dynamically) bound by the first waiter, and
	    unbound when the last finishes. However, this difference
	    is largely benign, and the cost of policing this feature
	    is non-trivial.
	  </para>
	</listitem>
	</itemizedlist>
</sect2>
</sect1>

<!-- }}} -->
<!-- {{{ Memory Management -->

<sect1 id="posix-memory-management">
<title>Memory Management &lsqb;POSIX Section 12&rsqb;</title>

<!-- =================================================================== -->

<sect2>
<title>Functions Implemented</title>
	
<para>
&lt;none&gt;
</para>
</sect2>

<!-- =================================================================== -->

<sect2>
<title>Functions Omitted</title>

<screen>
int mlockall( int flags ); 
int munlockall( void ); 
int mlock( const void &ast;addr, size&lowbar;t len ); 
int munlock( const void &ast;addr, size&lowbar;t len ); 
void mmap( void &ast;addr, size&lowbar;t len, int prot, int flags, 	 
	   int fd, off&lowbar;t off ); 
int munmap( void &ast;addr, size&lowbar;t len ); 
int mprotect( const void &ast;addr, size&lowbar;t len, int prot ); 
int msync( void &ast;addr, size&lowbar;t len, int flags ); 
int shm&lowbar;open( const char &ast;name, int oflag, mode&lowbar;t mode ); 
int shm&lowbar;unlink( const char &ast;name );
</screen>
</sect2>

<!-- =================================================================== -->

<sect2>
<title>Notes</title>
<para>
None of these functions are currently provided. Some may
be implemented in a restricted form in the future.
</para>

</sect2>
</sect1>

<!-- }}} -->
<!-- {{{ Execution Scheduling -->

<sect1 id="posix-execution-scheduling">
<title>Execution Scheduling &lsqb;POSIX Section 13&rsqb;</title>

<!-- =================================================================== -->

<sect2>
<title>Functions Implemented</title>

<screen>
int sched&lowbar;yield(void); 
int sched&lowbar;get&lowbar;priority&lowbar;max(int policy); 
int sched&lowbar;get&lowbar;priority&lowbar;min(int policy); 
int sched&lowbar;rr&lowbar;get&lowbar;interval(pid&lowbar;t pid, struct timespec &ast;t); 
int pthread&lowbar;attr&lowbar;setscope(pthread&lowbar;attr&lowbar;t &ast;attr, int scope); 
int pthread&lowbar;attr&lowbar;getscope(const pthread&lowbar;attr&lowbar;t &ast;attr, int &ast;scope); 
int pthread&lowbar;attr&lowbar;setinheritsched(pthread&lowbar;attr&lowbar;t &ast;attr, int inherit); 
int pthread&lowbar;attr&lowbar;getinheritsched(const pthread&lowbar;attr&lowbar;t &ast;attr, int &ast;inherit); 
int pthread&lowbar;attr&lowbar;setschedpolicy(pthread&lowbar;attr&lowbar;t &ast;attr, int policy); 
int pthread&lowbar;attr&lowbar;getschedpolicy(const pthread&lowbar;attr&lowbar;t &ast;attr, int &ast;policy);
int pthread&lowbar;attr&lowbar;setschedparam( pthread&lowbar;attr&lowbar;t &ast;attr, const struct sched&lowbar;param &ast;param); 
int pthread&lowbar;attr&lowbar;getschedparam( const pthread&lowbar;attr&lowbar;t &ast;attr,
	                        struct sched&lowbar;param &ast;param); 
int pthread&lowbar;setschedparam(pthread&lowbar;t thread, int policy,
	                  const struct sched&lowbar;param &ast;param); 
int pthread&lowbar;getschedparam(pthread&lowbar;t thread, int &ast;policy,
	                  struct sched&lowbar;param &ast;param); 
int pthread&lowbar;mutexattr&lowbar;setprotocol( pthread&lowbar;mutexattr&lowbar;t &ast;attr,
                                   int protocol);
int pthread&lowbar;mutexattr&lowbar;getprotocol( pthread&lowbar;mutexattr&lowbar;t &ast;attr,
                                   int &ast;protocol); 
int pthread&lowbar;mutexattr&lowbar;setprioceiling( pthread&lowbar;mutexattr&lowbar;t &ast;attr,
                                      int prioceiling); 
int pthread&lowbar;mutexattr&lowbar;getprioceiling( pthread&lowbar;mutexattr&lowbar;t &ast;attr,
	                              int &ast;prioceiling);
int pthread&lowbar;mutex&lowbar;setprioceiling( pthread&lowbar;mutex&lowbar;t &ast;mutex,
	                          int prioceiling,
	                          int &ast;old&lowbar;ceiling); 
int pthread&lowbar;mutex&lowbar;getprioceiling( pthread&lowbar;mutex&lowbar;t &ast;mutex,
                                  int &ast;prioceiling);
</screen>
</sect2>

<!-- =================================================================== -->

<sect2>
<title>Functions Omitted</title>

<screen>
int sched&lowbar;setparam(pid&lowbar;t pid, const struct sched&lowbar;param &ast;param); 
int sched&lowbar;getparam(pid&lowbar;t pid, struct sched&lowbar;param &ast;param); 
int sched&lowbar;setscheduler(pid&lowbar;t pid, int policy,
	               const struct sched&lowbar;param &ast;param); 
int sched&lowbar;getscheduler(pid&lowbar;t pid);
</screen>
</sect2>

<!-- =================================================================== -->

<sect2>
<title>Notes</title>
        <itemizedlist>
	<listitem>
	  <para>
	  The functions <emphasis>sched&lowbar;setparam()</emphasis>, 
	  <emphasis>sched&lowbar;getparam()</emphasis>,
	  <emphasis>sched&lowbar;setscheduler()</emphasis> and
	  <emphasis>sched&lowbar;getscheduler()</emphasis> are present
	  but always return an error.
	  </para>
	</listitem>
	<listitem>
	  <para>
	  The scheduler policy <emphasis>SCHED&lowbar;OTHER</emphasis> is
	  equivalent to <emphasis>SCHED&lowbar;RR</emphasis>.
	  </para>
	</listitem>
	<listitem>
	  <para>
	  Only <emphasis>PTHREAD&lowbar;SCOPE&lowbar;SYSTEM</emphasis>
	  is supported as a
	  <emphasis role="strong">contentionscope</emphasis>
	  attribute.
	  </para>
	</listitem>
	<listitem>
	  <para>
	  The default thread scheduling attributes are:
	  <screen>
	  contentionscope          PTHREAD&lowbar;SCOPE&lowbar;SYSTEM
	  inheritsched             PTHREAD&lowbar;INHERIT&lowbar;SCHED
	  schedpolicy              SCHED&lowbar;OTHER
	  schedparam.sched	   0
	  </screen>
          </para>
	</listitem>
	<listitem>
	  <para>
	  Mutex priority inversion protection is controlled by a
	  number of kernel configuration options.
	  If CYGSEM&lowbar;KERNEL&lowbar;SYNCH&lowbar;MUTEX&lowbar;PRIORITY&lowbar;INVERSION&lowbar;PROTOCOL&lowbar;INHERIT
	  is defined then
	  &lcub;&lowbar;POSIX&lowbar;THREAD&lowbar;PRIO&lowbar;INHERIT&rcub;
	  will be defined and PTHREAD&lowbar;PRIO&lowbar;INHERIT may
	  be set as the protocol in a
	  <emphasis>pthread&lowbar;mutexattr&lowbar;t</emphasis>
	  object.
	  If CYGSEM&lowbar;KERNEL&lowbar;SYNCH&lowbar;MUTEX&lowbar;PRIORITY&lowbar;INVERSION&lowbar;PROTOCOL&lowbar;CEILING
	  is defined then
	  &lcub;&lowbar;POSIX&lowbar;THREAD&lowbar;PRIO&lowbar;PROTECT&rcub;
	  will be defined and PTHREAD&lowbar;PRIO&lowbar;PROTECT may
	  be set as the protocol in a
	  <emphasis>pthread&lowbar;mutexattr&lowbar;t</emphasis> object.
          </para>
	</listitem>
	<listitem>
	  <para>
	  The default attribute values set by
	  <emphasis>pthread&lowbar;mutexattr&lowbar;init()</emphasis>
	  is to set the protocol attribute to
	  PTHREAD&lowbar;PRIO&lowbar;NONE and the prioceiling
	  attribute to zero.
	  </para>
	</listitem>
	</itemizedlist>

</sect2>
</sect1>

<!-- }}} -->
<!-- {{{ Clocks and Timers -->

<sect1 id="posix-clocks-and-timers">
<title>Clocks and Timers &lsqb;POSIX Section 14&rsqb;</title>

<!-- =================================================================== -->

<sect2>
<title>Functions Implemented</title>

<screen>
int clock&lowbar;settime( clockid&lowbar;t clock&lowbar;id,
const struct timespec &ast;tp); 
int clock&lowbar;gettime( clockid&lowbar;t clock&lowbar;id, struct timespec &ast;tp); 
int clock&lowbar;getres( clockid&lowbar;t clock&lowbar;id, struct timespec &ast;tp); 
int timer&lowbar;create( clockid&lowbar;t clock&lowbar;id, struct sigevent &ast;evp,
	          timer&lowbar;t &ast;timer&lowbar;id);
int timer&lowbar;delete( timer&lowbar;t timer&lowbar;id ); 
int timer&lowbar;settime( timer&lowbar;t timerid, int flags,
	           const struct itimerspec &ast;value,
	           struct itimerspec &ast;ovalue ); 
int timer&lowbar;gettime( timer&lowbar;t timerid, struct itimerspec &ast;value ); 
int timer&lowbar;getoverrun( timer&lowbar;t timerid ); 
int nanosleep( const struct timespec &ast;rqtp, struct timespec &ast;rmtp);
</screen>

</sect2>


<!-- =================================================================== -->

<sect2>
<title>Functions Omitted</title>
	
<para>
&lt;none&gt;
</para>

</sect2>

<!-- =================================================================== -->

<sect2>
<title>Notes</title>

<itemizedlist>
  <listitem>
    <para>
    Currently <emphasis>timer&lowbar;getoverrun()</emphasis> only
    reports timer notifications that are delayed in the timer
    subsystem.  If they are delayed in the signal subsystem, due to
    signal masks for example, this is not counted as an overrun.
    </para>
  </listitem>

  <listitem>
    <para>
    The option CYGPKG&lowbar;POSIX&lowbar;TIMERS allows the timer support to be
    enabled or disabled, and causes &lowbar;POSIX&lowbar;TIMERS to be defined
    appropriately. This will cause other parts of the POSIX system to
    have limited functionality.
    </para>
  </listitem>

</itemizedlist>

</sect2>
</sect1>

<!-- }}} -->
<!-- {{{ Message Passing -->

<sect1 id="posix-message-passing">
<title>Message Passing &lsqb;POSIX Section 15&rsqb;</title>

<!-- =================================================================== -->

<sect2>
<title>Functions Implemented</title>

<screen>
mqd&lowbar;t mq&lowbar;open( const char &ast;name, int  oflag, ... ); 
int mq&lowbar;close( mqd&lowbar;t  mqdes ); 
int mq&lowbar;unlink( const char &ast;name );
int mq&lowbar;send( mqd&lowbar;t mqdes, const char &ast;msg&lowbar;ptr,
	     size&lowbar;t msg&lowbar;len, unsigned int msg&lowbar;prio ); 
ssize&lowbar;t mq&lowbar;receive( mqd&lowbar;t mqdes, char &ast;msg&lowbar;ptr,
	            size&lowbar;t msg&lowbar;len, unsigned int &ast;msg&lowbar;prio );
int mq&lowbar;setattr( mqd&lowbar;t mqdes, const struct mq&lowbar;attr &ast;mqstat,
	        struct mq&lowbar;attr &ast;omqstat ); 
int mq&lowbar;getattr( mqd&lowbar;t mqdes, struct mq&lowbar;attr &ast;mqstat ); 
int mq&lowbar;notify( mqd&lowbar;t mqdes, const struct sigevent &ast;notification );
</screen>
<para>From POSIX 1003.1d draft: </para>
<screen>
int mq&lowbar;send( mqd&lowbar;t mqdes, const char &ast;msg&lowbar;ptr,
	     size&lowbar;t msg&lowbar;len, unsigned int msg&lowbar;prio,
             const struct timespec *abs_timeout ); 
ssize&lowbar;t mq&lowbar;receive( mqd&lowbar;t mqdes, char &ast;msg&lowbar;ptr,
	            size&lowbar;t msg&lowbar;len, unsigned int &ast;msg&lowbar;prio,
             const struct timespec *abs_timeout );
</screen>
</sect2>

<!-- =================================================================== -->

<sect2>
<title>Functions Omitted</title>
	
<para>
&lt;none&gt;
</para>

</sect2>

<!-- =================================================================== -->

<sect2>
<title>Notes</title>

<itemizedlist>
  <listitem>
    <para>
    The presence of message queues is controlled by the
    CYGPKG&lowbar;POSIX&lowbar;MQUEUES option.  Setting this will
    cause &lsqb;&lowbar;POSIX&lowbar;MESSAGE&lowbar;PASSING&rsqb; to
    be defined and the message queue API to be made available.
    </para>
  </listitem>

  <listitem>
    <para>
    Message queues are not currently filesystem objects. They live in
    their own name and descriptor spaces.
    </para>
  </listitem>
</itemizedlist>

</sect2>
</sect1>

<!-- }}} -->
<!-- {{{ Thread Management -->

<sect1 id="posix-thread-management">
<title>Thread Management &lsqb;POSIX Section 16&rsqb;</title>

<!-- =================================================================== -->

<sect2>
<title>Functions Implemented</title>

<screen>
int pthread&lowbar;attr&lowbar;init(pthread&lowbar;attr&lowbar;t &ast;attr); 
int pthread&lowbar;attr&lowbar;destroy(pthread&lowbar;attr&lowbar;t &ast;attr); 

⌨️ 快捷键说明

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