📄 strmlib.html
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/strmLib.html - generated by refgen from strmLib.c --> <title> strmLib </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>strmLib</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>strmLib</strong> - driver for the WindNet STREAMS I/O system (STREAMS Option) </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><i><a href="./strmLib.html#strmDriverAdd">strmDriverAdd</a></i>( )</b> - add a STREAMS driver into the STREAMS subsystem (STREAMS Option)<br><b><i><a href="./strmLib.html#strmModuleAdd">strmModuleAdd</a></i>( )</b> - add a STREAMS module to the STREAMS subsystem (STREAMS Option)<br><b><i><a href="./strmLib.html#strmTimeout">strmTimeout</a></i>( )</b> - execute a routine in a specified length of time (STREAMS Option)<br><b><i><a href="./strmLib.html#strmUntimeout">strmUntimeout</a></i>( )</b> - cancel previous <b><i><a href="./strmLib.html#strmTimeout">strmTimeout</a></i>( )</b> call (STREAMS Option)<br><b><i><a href="./strmLib.html#strmSleep">strmSleep</a></i>( )</b> - suspend task execution pending occurrence of an event (STREAMS Option)<br><b><i><a href="./strmLib.html#strmWakeup">strmWakeup</a></i>( )</b> - resume suspended task execution (STREAMS Option)<br><b><i><a href="./strmLib.html#strmSyncWriteAccess">strmSyncWriteAccess</a></i>( )</b> - access a shared data structure for synchronous writing (STREAMS Option)<br><b><i><a href="./strmLib.html#strmWeld">strmWeld</a></i>( )</b> - connect the <b>q_next</b> pointers of arbitrary streams (STREAMS Option)<br><b><i><a href="./strmLib.html#strmUnWeld">strmUnWeld</a></i>( )</b> - set the <b>q_next</b> pointers of streams queues to NULL (STREAMS Option)<br><b><i><a href="./strmLib.html#strmPipe">strmPipe</a></i>( )</b> - create an intertask channel (STREAMS Option)<br><b><i><a href="./strmLib.html#strmMkfifo">strmMkfifo</a></i>( )</b> - create a STREAMS FIFO (STREAMS Option)<br><b><i><a href="./strmLib.html#mps_fd_to_sth">mps_fd_to_sth</a></i>( )</b> - return the Stream Head pointer for a given fd<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This library is a VxWorks device driver that provides the programmerinterface to the WindNet STREAMS head, and therefore, to any STREAMS driveror module in the system. It provides the standard <b>open</b>, <b>close</b>, <b>read</b>, <b>write</b> and <b>ioctl</b> routines (including <b><i><a href="./selectLib.html#select">select</a></i>( )</b>), as well as routines to load a driver or module, and the STREAMS <b><i>poll</i>( )</b> routine.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./strmLib.html#top">strmLib</a></b><hr><a name="strmDriverAdd"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>strmDriverAdd</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>strmDriverAdd</i>( )</strong> - add a STREAMS driver into the STREAMS subsystem (STREAMS Option)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS strmDriverAdd ( char * pStrmDriverName, /* driver name */ struct streamtab * pStreamtab, /* ptr to driver streamtab */ int cloneFlag, /* TRUE = clone device */ struct streamtab * pBuddyStreamtab, /* ptr to driver buddy streamtab */ int flags, /* open style SVR3 or SVR4 */ int sqlvl /* synchronization level */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine adds a STREAMS driver into the STREAMS subsystem.The input parameters are the driver name, the streamtab of the driver,the clone flag (to specify clone devices or non-clone devices), the streamtab for the writer buddy, the open style type supported by driver, andthe synchronization level.<p>For more information about writer buddies, see the <i>WindNet STREAMS Optional Component Supplement. </i><p></blockquote><h4>RETURNS</h4><blockquote><p>OK if successful, otherwise ERROR.<p></blockquote><h4>ERRNO</h4><blockquote><p><p>S_strmLib_INVALID_OPEN_STYLE <br> Invalid <i>flags</i> parameter. Must be <b>SVR3_STYLE_OPEN</b> or <b>SVR4_STYLE_OPEN</b>.<p>S_strmLib_INVALID_SYNC_LEVEL<br> Invalid synchronization-level parameter.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./strmLib.html#top">strmLib</a></b><hr><a name="strmModuleAdd"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>strmModuleAdd</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>strmModuleAdd</i>( )</strong> - add a STREAMS module to the STREAMS subsystem (STREAMS Option)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS strmModuleAdd ( char * pModuleName, /* module name */ struct streamtab * pStreamtab, /* ptr to Module streamtab */ struct streamtab * pBuddyStreamtab, /* ptr to Buddy streamtab */ int flags, /* open style SVR3 or SVR4 */ int sqlvl /* synchronization level */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine installs a STREAMS module into the STREAMS subsystem.The input parameters are the module name, the streamtab of the driver,the streamtab of the writer buddy, the open style type supported by the module, and the synchronization level.<p>For more information about writer buddies, see the <i>WindNet STREAMS Optional Component Supplement. </i><p></blockquote><h4>RETURNS</h4><blockquote><p>OK if successful, otherwise ERROR.<p></blockquote><h4>ERRNO</h4><blockquote><p><p>S_strmLib_INVALID_OPEN_STYLE <br> Invalid <i>flags</i> parameter. Must be <b>SVR3_STYLE_OPEN</b> or <b>SVR4_STYLE_OPEN</b>.<p>S_strmLib_INVALID_SYNC_LEVEL<br> Invalid <i>sqlvl</i> level parameter.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./strmLib.html#top">strmLib</a></b><hr><a name="strmTimeout"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>strmTimeout</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>strmTimeout</i>( )</strong> - execute a routine in a specified length of time (STREAMS Option)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int strmTimeout ( void (* pFunc)(), /* timeout callback function */ caddr_t pArg, /* argument to callback function */ long ticks /* time when callback should be called */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine schedules the function specified by <i>pFunc</i> to be calledafter a specified time interval. The <i>pArg</i> parameter is passed as theonly argument to <i>pFunc</i>.<p></blockquote><h4>RETURNS</h4><blockquote><p>The timer ID.<p></blockquote><h4>ERRNO</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./strmLib.html#top">strmLib</a></b>, <b><i><a href="./strmLib.html#strmUntimeout">strmUntimeout</a></i>( )</b><hr><a name="strmUntimeout"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>strmUntimeout</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>strmUntimeout</i>( )</strong> - cancel previous <b><i><a href="./strmLib.html#strmTimeout">strmTimeout</a></i>( )</b> call (STREAMS Option)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void strmUntimeout ( int timeoutId /* timer ID to be cancelled */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine cancels the pending <b><i><a href="./strmLib.html#strmTimeout">strmTimeout</a></i>( )</b> request specified by <i>timeoutId</i>.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>ERRNO</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./strmLib.html#top">strmLib</a></b>, <b><i><a href="./strmLib.html#strmTimeout">strmTimeout</a></i>( )</b><hr><a name="strmSleep"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>strmSleep</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>strmSleep</i>( )</strong> - suspend task execution pending occurrence of an event (STREAMS Option)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int strmSleep ( ulong_t event /* sleep event */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine suspends execution of a task to await an event specified in the parameter <i>event</i>. STREAMS drivers and modules are only allowed to invoke <b><i><a href="./strmLib.html#strmSleep">strmSleep</a></i>( )</b> during their open and close procedures. STREAMS components that invoke <b><i><a href="./strmLib.html#strmSleep">strmSleep</a></i>( )</b> can be awakened by <b><i><a href="./strmLib.html#strmWakeup">strmWakeup</a></i>( )</b> after theawaited event has occurred.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>ERRNO</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./strmLib.html#top">strmLib</a></b>, <b><i><a href="./strmLib.html#strmWakeup">strmWakeup</a></i>( )</b><hr><a name="strmWakeup"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>strmWakeup</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>strmWakeup</i>( )</strong> - resume suspended task execution (STREAMS Option)</p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -