📄 semolib.html
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/semOLib.html - generated by refgen from semOLib.c --> <title> semOLib </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.html"><i>VxWorks Reference Manual : Libraries</i></a></p></blockquote><h1>semOLib</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>semOLib</strong> - release 4.x binary semaphore library </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><i><a href="./semOLib.html#semCreate">semCreate</a></i>( )</b> - create and initialize a release 4.x binary semaphore<br><b><i><a href="./semOLib.html#semInit">semInit</a></i>( )</b> - initialize a static binary semaphore<br><b><i><a href="./semOLib.html#semClear">semClear</a></i>( )</b> - take a release 4.x semaphore, if the semaphore is available<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This library is provided for backward compatibility with VxWorks 4.x semaphores. The semaphores are identical to 5.0 binary semaphores, except that timeouts -- missing or specified -- are ignored.<p>For backward compatibility, <b><i><a href="./semOLib.html#semCreate">semCreate</a></i>( )</b> operates as before, allocating andinitializing a 4.x-style semaphore. Likewise, <b><i><a href="./semOLib.html#semClear">semClear</a></i>( )</b> has been implementedas a <b><i><a href="./semLib.html#semTake">semTake</a></i>( )</b>, with a timeout of <b>NO_WAIT</b>.<p>For more information on of the behavior of binary semaphores, seethe manual entry for semBLib.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>semLib.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./semOLib.html#top">semOLib</a></b>, <b><a href="./semLib.html#top">semLib</a></b>, <b><a href="./semBLib.html#top">semBLib</a></b>, <i>VxWorks Programmer's Guide: Basic OS</i><hr><a name="semCreate"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>semCreate</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>semCreate</i>( )</strong> - create and initialize a release 4.x binary semaphore</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>SEM_ID semCreate (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine allocates a VxWorks 4.x binary semaphore. The semaphore isinitialized to empty. After initialization, it must be given before itcan be taken.<p></blockquote><h4>RETURNS</h4><blockquote><p>The semaphore ID, or NULL if memory cannot be allocated.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./semOLib.html#top">semOLib</a></b>, <b><i><a href="./semOLib.html#semInit">semInit</a></i>( )</b><hr><a name="semInit"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>semInit</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>semInit</i>( )</strong> - initialize a static binary semaphore</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS semInit ( SEMAPHORE * pSemaphore /* 4.x semaphore to initialize */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine initializes static VxWorks 4.x semaphores. In someinstances, a semaphore cannot be created with <b><i><a href="./semOLib.html#semCreate">semCreate</a></i>( )</b> but is a staticobject.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the semaphore cannot be initialized.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./semOLib.html#top">semOLib</a></b>, <b><i><a href="./semOLib.html#semCreate">semCreate</a></i>( )</b><hr><a name="semClear"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>semClear</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>semClear</i>( )</strong> - take a release 4.x semaphore, if the semaphore is available</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS semClear ( SEM_ID semId /* semaphore ID to empty */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine takes a VxWorks 4.x semaphore if it is available (full), otherwise no action is taken except to return ERROR. This routine never preempts the caller.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the semaphore is unavailable.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./semOLib.html#top">semOLib</a></b></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -