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

📄 aiopxlib.html

📁 Vxworks API操作系统和驱动程序设计API。压缩的HTML文件
💻 HTML
📖 第 1 页 / 共 2 页
字号:
</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine initializes the AIO library.  It should be called onlyonce after the I/O system has been initialized.  <i>lioMax</i> specifies the maximum number of outstanding <b><a href="./aioPxLib.html#lio_listio">lio_listio</a>(&nbsp;)</b> calls at one time.  If <i>lioMax</i>is zero, the default value of <b>AIO_CLUST_MAX</b> is used.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK if successful, otherwise ERROR.<p></blockquote><h4>ERRNO</h4><blockquote><p><b>S_aioPxLib_IOS_NOT_INITIALIZED</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./aioPxLib.html#top">aioPxLib</a></b><hr><a name="aio_read"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>aio_read(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>aio_read(&nbsp;)</strong> - initiate an asynchronous read (POSIX)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int aio_read    (    struct aiocb * pAiocb     /* AIO control block */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine asynchronously reads data based on the following parametersspecified by members of the AIO control structure <i>pAiocb</i>.  It reads<b>aio_nbytes</b> bytes of data from the file <b>aio_fildes</b> into the buffer<b>aio_buf</b>.<p>The requested operation takes place at the absolute position in the fileas specified by <b>aio_offset</b>.<p><b>aio_reqprio</b> can be used to lower the priority of the AIO request; ifthis parameter is nonzero, the priority of the AIO request is<b>aio_reqprio</b> lower than the calling task priority.<p>The call returns when the read request has been initiated or queued to thedevice.  <b><a href="./aioPxLib.html#aio_error">aio_error</a>(&nbsp;)</b> can be used to determine the error status and of theAIO operation.  On completion, <b><a href="./aioPxLib.html#aio_return">aio_return</a>(&nbsp;)</b> can be used to determine thereturn status.<p><b>aio_sigevent</b> defines the signal to be generated on completion of the read request.  If this value is zero, no signal is generated. <p></blockquote><h4>RETURNS</h4><blockquote><p>OK if the read queued successfully, otherwise ERROR.<p></blockquote><h4>ERRNO</h4><blockquote><p>EBADF, EINVAL<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>aio.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./aioPxLib.html#top">aioPxLib</a></b>, <b><a href="./aioPxLib.html#aio_error">aio_error</a>(&nbsp;)</b>, <b><a href="./aioPxLib.html#aio_return">aio_return</a>(&nbsp;)</b>, <b><a href="./ioLib.html#read">read</a>(&nbsp;)</b><hr><a name="aio_write"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>aio_write(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>aio_write(&nbsp;)</strong> - initiate an asynchronous write (POSIX)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int aio_write    (    struct aiocb * pAiocb     /* AIO control block */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine asynchronously writes data based on the following parametersspecified by members of the AIO control structure <i>pAiocb</i>.  It writes<b>aio_nbytes</b> of data to the file <b>aio_fildes</b> from the buffer <b>aio_buf</b>.<p>The requested operation takes place at the absolute position in the fileas specified by <b>aio_offset</b>.<p><b>aio_reqprio</b> can be used to lower the priority of the AIO request; ifthis parameter is nonzero, the priority of the AIO request is<b>aio_reqprio</b> lower than the calling task priority.<p>The call returns when the write request has been initiated or queued tothe device.  <b><a href="./aioPxLib.html#aio_error">aio_error</a>(&nbsp;)</b> can be used to determine the error status and ofthe AIO operation.  On completion, <b><a href="./aioPxLib.html#aio_return">aio_return</a>(&nbsp;)</b> can be used to determinethe return status.<p><b>aio_sigevent</b> defines the signal to be generated on completion of the write request.  If this value is zero, no signal is generated. <p></blockquote><h4>RETURNS</h4><blockquote><p>OK if write queued successfully, otherwise ERROR.<p></blockquote><h4>ERRNO</h4><blockquote><p>EBADF, EINVAL<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>aio.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./aioPxLib.html#top">aioPxLib</a></b>, <b><a href="./aioPxLib.html#aio_error">aio_error</a>(&nbsp;)</b>, <b><a href="./aioPxLib.html#aio_return">aio_return</a>(&nbsp;)</b>, <b><a href="./ioLib.html#write">write</a>(&nbsp;)</b><hr><a name="lio_listio"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>lio_listio(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>lio_listio(&nbsp;)</strong> - initiate a list of asynchronous I/O requests (POSIX)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int lio_listio    (    int               mode,   /* LIO_WAIT or LIO_NOWAIT */    struct aiocb *    list[], /* list of operations */    int               nEnt,   /* size of list */    struct sigevent * pSig    /* signal on completion */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine submits a number of I/O operations (up to <b>AIO_LISTIO_MAX</b>)to be performed asynchronously.  <i>list</i> is a pointer to an array of <b>aiocb</b> structures that specify the AIO operations to be performed.  The array is of size <i>nEnt</i>.   <p>The <b>aio_lio_opcode</b> field of the <b>aiocb</b> structure specifies the AIOoperation to be performed.  Valid entries include <b>LIO_READ</b>, <b>LIO_WRITE</b>, and<b>LIO_NOP</b>.  <b>LIO_READ</b> corresponds to a call to <b><a href="./aioPxLib.html#aio_read">aio_read</a>(&nbsp;)</b>, <b>LIO_WRITE</b>corresponds to a call to <b><a href="./aioPxLib.html#aio_write">aio_write</a>(&nbsp;)</b>, and <b>LIO_NOP</b> is ignored.<p>The <i>mode</i> argument can be either <b>LIO_WAIT</b> or <b>LIO_NOWAIT</b>.  If <i>mode</i> is <b>LIO_WAIT</b>, <b><a href="./aioPxLib.html#lio_listio">lio_listio</a>(&nbsp;)</b> does not return until all the AIO operations complete and the <i>pSig</i> argument is ignored.  If <i>mode</i> is <b>LIO_NOWAIT</b>, the <b><a href="./aioPxLib.html#lio_listio">lio_listio</a>(&nbsp;)</b> returns as soon as the operations are queued.  In this case, if <i>pSig</i> is not NULL and the signal number indicated by<b>pSig->sigev_signo</b> is not zero, the signal <b>pSig->sigev_signo</b> isdelivered when all requests have completed.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK if requests queued successfully, otherwise ERROR.<p></blockquote><h4>ERRNO</h4><blockquote><p>EINVAL, EAGAIN, EIO<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>aio.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./aioPxLib.html#top">aioPxLib</a></b>, <b><a href="./aioPxLib.html#aio_read">aio_read</a>(&nbsp;)</b>, <b><a href="./aioPxLib.html#aio_write">aio_write</a>(&nbsp;)</b>, <b><a href="./aioPxLib.html#aio_error">aio_error</a>(&nbsp;)</b>, <b><a href="./aioPxLib.html#aio_return">aio_return</a>(&nbsp;)</b>.<hr><a name="aio_suspend"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>aio_suspend(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>aio_suspend(&nbsp;)</strong> - wait for asynchronous I/O request(s)  (POSIX)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int aio_suspend    (    const struct aiocb *    list[], /* AIO requests */    int                     nEnt,   /* number of requests */    const struct timespec * timeout /* wait timeout */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine suspends the caller until one of the following occurs:<ul><li>at least one of the previously submitted asynchronous I/O operations</li>referenced by <i>list</i> has completed,<li>a signal interrupts the function, or</li><li>the time interval specified by <i>timeout</i> has passed</li>(if <i>timeout</i> is not NULL).</ul><p></blockquote><h4>RETURNS</h4><blockquote><p>OK if an AIO request completes, otherwise ERROR.<p></blockquote><h4>ERRNO</h4><blockquote><p>EAGAIN, EINTR  <p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>aio.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./aioPxLib.html#top">aioPxLib</a></b><hr><a name="aio_error"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>aio_error(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>aio_error(&nbsp;)</strong> - retrieve error status of asynchronous I/O operation (POSIX)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int aio_error    (    const struct aiocb * pAiocb /* AIO control block */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine returns the error status associated with the I/O operation specified by <i>pAiocb</i>.  If the operation is not yet completed, the error status will be EINPROGRESS.<p></blockquote><h4>RETURNS</h4><blockquote><p><p>&nbsp;EINPROGRESS&nbsp;if&nbsp;the&nbsp;AIO&nbsp;operation&nbsp;has&nbsp;not&nbsp;yet&nbsp;completed,<br>&nbsp;OK&nbsp;if&nbsp;the&nbsp;AIO&nbsp;operation&nbsp;completed&nbsp;successfully,<br>&nbsp;the&nbsp;error&nbsp;status&nbsp;if&nbsp;the&nbsp;AIO&nbsp;operation&nbsp;failed,&nbsp;<br>&nbsp;otherwise&nbsp;ERROR.<p></blockquote><h4>ERRNO</h4><blockquote><p>EINVAL<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>aio.h</b></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./aioPxLib.html#top">aioPxLib</a></b><hr><a name="aio_return"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>aio_return(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>aio_return(&nbsp;)</strong> - retrieve return status of asynchronous I/O operation (POSIX)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>size_t aio_return    (    struct aiocb * pAiocb     /* AIO control block */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine returns the return status associated with the I/O operationspecified by <i>pAiocb</i>.  The return status for an AIO operation is the value that would be returned by the corresponding <b><a href="./ioLib.html#read">read</a>(&nbsp;)</b>, <b><a href="./ioLib.html#write">write</a>(&nbsp;)</b>, or <b>fsync(&nbsp;)</b> call.  <b><a href="./aioPxLib.html#aio_return">aio_return</a>(&nbsp;)</b> may be called only after the AIO operationhas completed (<b><a href="./aioPxLib.html#aio_error">aio_error</a>(&nbsp;)</b> returns a valid error code--not EINPROGRESS).Furthermore, <b><a href="./aioPxLib.html#aio_return">aio_return</a>(&nbsp;)</b> may be called only once; subsequent calls will fail.<p></blockquote><h4>RETURNS</h4><blockquote><p>The return status of the completed AIO request, or ERROR. <p></blockquote><h4>ERRNO</h4><blockquote><p>EINVAL, EINPROGRESS<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>aio.h</b></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./aioPxLib.html#top">aioPxLib</a></b></body></html>

⌨️ 快捷键说明

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