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

📄 posix.sgml

📁 eCos/RedBoot for勤研ARM AnywhereII(4510) 含全部源代码
💻 SGML
📖 第 1 页 / 共 4 页
字号:
	    currently be ignored.
	    </para>
	  </listitem>
	  <listitem>
	    <para>
	    Most of the functionality of these functions depends on
	    the underlying filesystem.
	    </para>
	    </listitem>
	  <listitem>
	    <para>
	    Currently<emphasis> access()</emphasis> only checks the 
	    <emphasis>F&lowbar;OK</emphasis> mode explicitly, the others are
	    all assumed to be true by default.
	    </para>
	  </listitem>
	  <listitem>
	    <para>
	    The maximum number of open files allowed is supplied by
	    the CYGNUM&lowbar;FILEIO&lowbar;NFILE option. The maximum number
	    of file descriptors is supplied by the CYGNUM&lowbar;FILEIO&lowbar;NFD
	    option.  
	    </para>
	  </listitem>
	</itemizedlist>
</sect2>
</sect1>

<!-- }}} -->
<!-- {{{ Input and Output -->

<sect1 id="posix-input-and-output">
<title>Input and Output &lsqb;POSIX Section 6&rsqb;</title>

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

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

<screen>
int dup( int fd ); 
int dup2( int fd, int fd2 ); 
int close(int fd); 
ssize&lowbar;t	read(int fd, void &ast;buf, size&lowbar;t nbyte); 
ssize&lowbar;t	write(int fd, const void &ast;buf, size&lowbar;t nbyte); 
int fcntl( int fd, int cmd, ... ); 
off&lowbar;t lseek(int fd, off&lowbar;t offset, int whence); 
int fsync( int fd );
int fdatasync( int fd );</screen>
</sect2>

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

<sect2>
<title>Functions Omitted</title>
<screen>
int pipe( int fildes&lsqb;2&rsqb; ); 
int aio&lowbar;read( struct aiocb &ast;aiocbp );				&sol;&sol; TBA 
int aio&lowbar;write( struct aiocb &ast;aiocbp );				&sol;&sol; TBA 
int lio&lowbar;listio( int mode, struct aiocb &ast;const list&lsqb;&rsqb;,
                int nent, struct sigevent &ast;sig);		&sol;&sol; TBA 
int aio&lowbar;error( struct aiocb &ast;aiocbp );				&sol;&sol; TBA 
int aio&lowbar;return( struct aiocb &ast;aiocbp );				&sol;&sol; TBA 
int aio&lowbar;cancel( int fd, struct aiocb &ast;aiocbp );			&sol;&sol; TBA 
int aio&lowbar;suspend( const struct aiocb &ast;const list&lsqb;&rsqb;,
                 int nent, const struct timespec &ast;timeout );	&sol;&sol; TBA 
int aio&lowbar;fsync( int op, struct aiocb &ast;aiocbp );
&sol;&sol; TBA
</screen>
</sect2>

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

<sect2>
<title>Notes</title>
        <itemizedlist>
	  <listitem>
	    <para>
	    Only the <emphasis>F&lowbar;DUPFD</emphasis> command
	    of <emphasis>fcntl()</emphasis> is currently implemented.
	    </para>
	  </listitem>
	  <listitem>
	    <para>
	    Most of the functionality of these functions depends on
	    the underlying filesystem.
	    </para>
	  </listitem>
	</itemizedlist>
</sect2>
</sect1>

<!-- }}} -->
<!-- {{{ Device and Class Specific Functions -->

<sect1 id="posix-device-and-class-specific-functions">
<title>Device and Class Specific Functions &lsqb;POSIX Section 7&rsqb;</title>

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

<sect2>
<title>Functions Implemented</title>
<screen>
speed&lowbar;t cfgetospeed( const struct termios &ast;termios&lowbar;p ); 
int cfsetospeed( struct termios &ast;termios&lowbar;p, speed&lowbar;t speed ); 
speed&lowbar;t cfgetispeed( const struct termios &ast;termios&lowbar;p ); 
int cfsetispeed( struct termios &ast;termios&lowbar;p, speed&lowbar;t speed ); 
int tcgetattr( int fd, struct termios &ast;termios&lowbar;p ); 
int tcsetattr( int fd, int optional&lowbar;actions,
	       const struct termios &ast;termios&lowbar;p ); 
int tcsendbreak( int fd, int duration ); 
int tcdrain( int fd );
int tcflush( int fd, int queue&lowbar;selector ); 
int tcsendbreak( int fd, int action );
</screen>
</sect2>

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

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

<screen>
pid&lowbar;t tcgetpgrp( int fd ); 
int tcsetpgrp( int fd, pid&lowbar;t pgrp );</screen>
</sect2>

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

<sect2>
<title>Notes</title>
        <itemizedlist>
	  <listitem>
	    <para>
	    Only the functionality relevant to basic serial device
	    control is implemented. Only very limited support for
	    canonical input is provided, and then only via the
	    &ldquo;tty&rdquo; devices, not the &ldquo;serial&rdquo;
	    devices. None of the functionality relevant to job
	    control, controlling terminals and sessions is
	    implemented.
	    </para>
	  </listitem>
	  <listitem>
	    <para>
	    Only <emphasis>MIN</emphasis> &equals; 0 and
	    <emphasis>TIME</emphasis> &equals; 0 functionality is
	    provided.
	    </para>
	  </listitem>
	  <listitem>
	    <para>
	    Hardware flow control is supported if the underlying
	    device driver and serial port support it.
	    </para>
	  </listitem>
	  <listitem>
	    <para>
	    Support for break, framing and parity errors depends on
	    the functionality of the hardware and device driver.
	    </para>
	  </listitem>
	</itemizedlist>
</sect2>
</sect1>

<!-- }}} -->
<!-- {{{ C Language Services -->

<sect1 id="posix-C-language-services">
<title>C Language Services &lsqb;POSIX Section 8&rsqb;</title>

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

<sect2>
<title>Functions Implemented</title>
<screen>
char &ast;setlocale( int category, const char &ast;locale ); 
int fileno( FILE &ast;stream ); 
FILE &ast;fdopen( int fd, const char &ast;type ); 
int getc&lowbar;unlocked( FILE &ast;stream); 
int getchar&lowbar;unlocked( void ); 
int putc&lowbar;unlocked( FILE &ast;stream ); 
int putchar&lowbar;unlocked( void ); 
char &ast;strtok&lowbar;r( char &ast;s, const char &ast;sep, 
                char &ast;&ast;lasts ); 
char &ast;asctime&lowbar;r( const struct tm &ast;tm, char &ast;buf ); 
char &ast;ctime&lowbar;r( const time&lowbar;t &ast;clock, char &ast;buf ); 
struct tm &ast;gmtime&lowbar;r( const time&lowbar;t &ast;clock,
                     struct tm &ast;result ); 
struct tm &ast;localtime&lowbar;r( const time&lowbar;t &ast;clock,
                        struct tm &ast;result ); 
int rand&lowbar;r( unsigned int &ast;seed );
</screen>
</sect2>

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

<sect2>
<title>Functions Omitted</title>
<screen>
void flockfile( FILE &ast;file ); 
int ftrylockfile( FILE &ast;file ); 
void funlockfile( FILE &ast;file ); 
int sigsetjmp( sigjmp&lowbar;buf env, int savemask );			&sol;&sol; TBA 
void siglongjmp( sigjmp&lowbar;buf env, int val );			&sol;&sol; TBA 
void tzset(void);                                                       &sol;&sol; TBA
</screen>
</sect2>

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

<sect2>
<title>Notes</title>
	<itemizedlist>
	  <listitem>
	    <para>
	    <emphasis>setlocale()</emphasis> is implemented in the C
	    library Internationalization package.
	    </para>
	  </listitem>
	  <listitem>
	    <para>
	    Functions <emphasis>fileno()</emphasis> and
	    <emphasis>fdopen()</emphasis> are implemented in the C
	    library STDIO package.
	    </para>
	  </listitem>
	  <listitem>
	    <para>
	    Functions <emphasis>getc&lowbar;unlocked()</emphasis>, 
	    <emphasis>getchar&lowbar;unlocked()</emphasis>,
	    <emphasis>putc&lowbar;unlocked()</emphasis> and
	    <emphasis>putchar&lowbar;unlocked()</emphasis> are defined
	    but are currently identical to their non-unlocked
	    equivalents.
	    </para>
	  </listitem>
	  <listitem>
	    <para>
	    <emphasis>strtok&lowbar;r()</emphasis>, <emphasis>asctime&lowbar;r()</emphasis>, 
	    <emphasis>ctime&lowbar;r()</emphasis>, <emphasis>gmtime&lowbar;r()</emphasis>, 
	    <emphasis>localtime&lowbar;r()</emphasis> and
	    <emphasis>rand&lowbar;r()</emphasis> are all currently in
	    the C library, alongside their non-reentrant versions.
	    </para>
	  </listitem>
	</itemizedlist>
</sect2>
</sect1>

<!-- }}} -->
<!-- {{{ System Databases -->

<sect1 id="posix-system-databases">
<title>System Databases &lsqb;POSIX Section 9&rsqb;</title>

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

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

</sect2>

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

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

<screen>
struct group &ast;getgrgid( gid&lowbar;t gid ); 
int getgrgid( gid&lowbar;t gid, struct group &ast;grp, char &ast;buffer, 
	      size&lowbar;t bufsize, struct group &ast;&ast;result ); 
struct group &ast;getgrname( const char &ast;name ); 
int getgrname&lowbar;r( const char &ast;name, struct group &ast;grp,
                 char &ast;buffer, size&lowbar;t bufsize, struct group &ast;&ast;result ); 
struct passwd &ast;getpwuid( uid&lowbar;t uid ); 
int getpwuid&lowbar;r( uid&lowbar;t uid, struct passwd &ast;pwd,
                char &ast;buffer, size&lowbar;t bufsize, struct passwd &ast;&ast;result ); 
struct passwd &ast;getpwnam( const char &ast;name ); 
int getpwnam&lowbar;r( const char &ast;name, struct passwd &ast;pwd,
                char &ast;buffer, size&lowbar;t bufsize, struct passwd &ast;&ast;result );
</screen>
</sect2>

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

<sect2>
<title>Notes</title>
        <itemizedlist>
	  <listitem>
	    <para>
	    None of the functions in this section are implemented.
	    </para>
	  </listitem>
	</itemizedlist>
</sect2>
</sect1>

<!-- }}} -->
<!-- {{{ Data Interchange Format -->

<sect1 id="posix-data-interchange-format">
<title>Data Interchange Format &lsqb;POSIX Section 10&rsqb;</title>
      
<para>
This section details <emphasis>tar</emphasis> and
<emphasis>cpio</emphasis> formats. Neither of these is supported by
eCos.
</para>
</sect1>

<!-- }}} -->
<!-- {{{ Synchronization -->

<sect1 id="posix-synchronization">
<title>Synchronization &lsqb;POSIX Section 11&rsqb;</title>


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

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

<screen>
int sem&lowbar;init(sem&lowbar;t &ast;sem, int pshared, unsigned int value); 
int sem&lowbar;destroy(sem&lowbar;t &ast;sem); 
int sem&lowbar;wait(sem&lowbar;t &ast;sem); 
int sem&lowbar;trywait(sem&lowbar;t &ast;sem); 
int sem&lowbar;post(sem&lowbar;t &ast;sem);
int sem&lowbar;getvalue(sem&lowbar;t &ast;sem, int &ast;sval); 
int pthread&lowbar;mutexattr&lowbar;init( pthread&lowbar;mutexattr&lowbar;t &ast;attr); 
int pthread&lowbar;mutexattr&lowbar;destroy( pthread&lowbar;mutexattr&lowbar;t &ast;attr); 
int pthread&lowbar;mutex&lowbar;init(pthread&lowbar;mutex&lowbar;t &ast;mutex,
	               const pthread&lowbar;mutexattr&lowbar;t &ast;mutex&lowbar;attr); 
int pthread&lowbar;mutex&lowbar;destroy(pthread&lowbar;mutex&lowbar;t &ast;mutex); 
int pthread&lowbar;mutex&lowbar;lock(pthread&lowbar;mutex&lowbar;t &ast;mutex); 
int pthread&lowbar;mutex&lowbar;trylock(pthread&lowbar;mutex&lowbar;t &ast;mutex); 
int pthread&lowbar;mutex&lowbar;unlock(pthread&lowbar;mutex&lowbar;t &ast;mutex); 
int pthread&lowbar;condattr&lowbar;init(pthread&lowbar;condattr&lowbar;t &ast;attr); 
int pthread&lowbar;condattr&lowbar;destroy(pthread&lowbar;condattr&lowbar;t &ast;attr); 
int pthread&lowbar;cond&lowbar;init(pthread&lowbar;cond&lowbar;t &ast;cond, 
	               const pthread&lowbar;condattr&lowbar;t &ast;attr); 
int pthread&lowbar;cond&lowbar;destroy(pthread&lowbar;cond&lowbar;t &ast;cond); 
int pthread&lowbar;cond&lowbar;signal(pthread&lowbar;cond&lowbar;t &ast;cond); 
int pthread&lowbar;cond&lowbar;broadcast(pthread&lowbar;cond&lowbar;t &ast;cond); 
int pthread&lowbar;cond&lowbar;wait(pthread&lowbar;cond&lowbar;t &ast;cond, 
	               pthread&lowbar;mutex&lowbar;t &ast;mutex);
int pthread&lowbar;cond&lowbar;timedwait(pthread&lowbar;cond&lowbar;t &ast;cond,
	                   pthread&lowbar;mutex&lowbar;t &ast;mutex,
	                   const struct timespec &ast;abstime);
</screen>
</sect2>

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

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

<screen>
sem&lowbar;t &ast;sem&lowbar;open(const char &ast;name, int oflag, ...);		&sol;&sol; TBA 
int sem&lowbar;close(sem&lowbar;t &ast;sem);					&sol;&sol; TBA 
int sem&lowbar;unlink(const char &ast;name);				&sol;&sol; TBA 
int pthread&lowbar;mutexattr&lowbar;getpshared( const pthread&lowbar;mutexattr&lowbar;t &ast;attr,
	                          int &ast;pshared );
int pthread&lowbar;mutexattr&lowbar;setpshared( const pthread&lowbar;mutexattr&lowbar;t &ast;attr,
	                          int pshared );
int  pthread&lowbar;condattr&lowbar;getpshared( const pthread&lowbar;condattr&lowbar;t &ast;attr, 
	                          int &ast;pshared);
int  pthread&lowbar;condattr&lowbar;setpshared( const pthread&lowbar;condattr&lowbar;t &ast;attr,
	                          int pshared);</screen>
</sect2>

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

<sect2>
<title>Notes</title>
        <itemizedlist>
	  <listitem>
	    <para>
	    The presence of semaphores is controlled by the
	    CYGPKG&lowbar;POSIX&lowbar;SEMAPHORES option. This in turn
	    causes the &lowbar;POSIX&lowbar;SEMAPHORES feature test
	    macro to be defined and the semaphore API to be made
	    available.
	    </para>
	  </listitem>
	  
	  <listitem>

⌨️ 快捷键说明

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