zbuflib.html
来自「Vxworks API操作系统和驱动程序设计API。压缩的HTML文件」· HTML 代码 · 共 776 行 · 第 1/3 页
HTML
776 行
<a name="zbufDup"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>zbufDup( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>zbufDup( )</strong> - duplicate a zbuf</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>ZBUF_ID zbufDup ( ZBUF_ID zbufId, /* zbuf to duplicate */ ZBUF_SEG zbufSeg, /* zbuf segment base for <i>offset</i> */ int offset, /* relative byte offset */ int len /* number of bytes to duplicate */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine duplicates <i>len</i> bytes of <i>zbufId</i> starting at the specifiedbyte location, and returns the zbuf ID of the newly created duplicate zbuf. <p>The starting location of duplication is specified by <i>zbufSeg</i> and <i>offset</i>.See the <b><a href="./zbufLib.html#top">zbufLib</a></b> manual page for more information onspecifying a byte location within a zbuf. In particular, the firstbyte duplicated is the exact byte specified by <i>zbufSeg</i> and <i>offset</i>.<p>The number of bytes to duplicate is given by <i>len</i>. If this parameteris negative, or is larger than the number of bytes in the zbuf after thespecified byte location, the rest of the zbuf is duplicated.<p>Duplication of zbuf data does not usually involve copying of the data.Instead, the zbuf segment pointer information is duplicated, while the datais not, which means that the data is shared among all zbuf segmentsthat reference the data. See the <b><a href="./zbufLib.html#top">zbufLib</a></b> manualpage for more information on copying and sharing zbuf data.<p></blockquote><h4>RETURNS</h4><blockquote><p><p>The zbuf ID of a newly created duplicate zbuf,or NULL if the operation fails.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./zbufLib.html#top">zbufLib</a></b><hr><a name="zbufLength"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>zbufLength( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>zbufLength( )</strong> - determine the length in bytes of a zbuf</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int zbufLength ( ZBUF_ID zbufId /* zbuf to determine length */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine returns the number of bytes in the zbuf <i>zbufId</i>.<p></blockquote><h4>VXWORKS AE PROTECTION DOMAINS</h4><blockquote><p>Under VxWorks AE, you can call this function from within the kernel protection domain only. In addition, all arguments to this function can reference only that data which is valid in the kernel protection domain. This restriction does not apply under non-AE versions of VxWorks. <p></blockquote><h4>RETURNS</h4><blockquote><p><p>The number of bytes in the zbuf,or ERROR if the operation fails.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./zbufLib.html#top">zbufLib</a></b><hr><a name="zbufSegFind"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>zbufSegFind( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>zbufSegFind( )</strong> - find the zbuf segment containing a specified byte location</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>ZBUF_SEG zbufSegFind ( ZBUF_ID zbufId, /* zbuf to examine */ ZBUF_SEG zbufSeg, /* zbuf segment base for <i>pOffset</i> */ int * pOffset /* relative byte offset */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine translates an address within a zbuf to its most localformulation. <b><a href="./zbufLib.html#zbufSegFind">zbufSegFind</a>( )</b> locates the zbuf segment in <i>zbufId</i>that contains the byte location specified by <i>zbufSeg</i> and *<i>pOffset</i>,then returns that zbuf segment, and writes in *<i>pOffset</i> the new offsetrelative to the returned segment.<p>If the <i>zbufSeg</i>, *<i>pOffset</i> pair specify a byte location past the endof the zbuf, or before the first byte in the zbuf, <b><a href="./zbufLib.html#zbufSegFind">zbufSegFind</a>( )</b>returns NULL.<p>See the <b><a href="./zbufLib.html#top">zbufLib</a></b> manual page for a full discussion of addressing zbufsby segment and offset.<p></blockquote><h4>VXWORKS AE PROTECTION DOMAINS</h4><blockquote><p>Under VxWorks AE, you can call this function from within the kernel protection domain only. In addition, all arguments to this function can reference only that data which is valid in the kernel protection domain. Likewise, the returned value is valid in the protection domain only.This restriction does not apply under non-AE versions of VxWorks. <p></blockquote><h4>RETURNS</h4><blockquote><p><p>The zbuf segment ID of the segment containing the specified byte,or NULL if the operation fails.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./zbufLib.html#top">zbufLib</a></b><hr><a name="zbufSegNext"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>zbufSegNext( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>zbufSegNext( )</strong> - get the next segment in a zbuf</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>ZBUF_SEG zbufSegNext ( ZBUF_ID zbufId, /* zbuf to examine */ ZBUF_SEG zbufSeg /* segment to get next segment */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine finds the zbuf segment in <i>zbufId</i> that is just afterthe zbuf segment <i>zbufSeg</i>. If <i>zbufSeg</i> is NULL, the segment afterthe first segment in <i>zbufId</i> is returned. If <i>zbufSeg</i> is the lastsegment in <i>zbufId</i>, NULL is returned.<p></blockquote><h4>RETURNS</h4><blockquote><p><p>The zbuf segment ID of the segment after <i>zbufSeg</i>,or NULL if the operation fails.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./zbufLib.html#top">zbufLib</a></b><hr><a name="zbufSegPrev"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>zbufSegPrev( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>zbufSegPrev( )</strong> - get the previous segment in a zbuf</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>ZBUF_SEG zbufSegPrev ( ZBUF_ID zbufId, /* zbuf to examine */ ZBUF_SEG zbufSeg /* segment to get previous segment */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine finds the zbuf segment in <i>zbufId</i> that is just before the zbuf segment <i>zbufSeg</i>. If <i>zbufSeg</i> is NULL, or is the first segment in <i>zbufId</i>,NULL is returned.<p></blockquote><h4>VXWORKS AE PROTECTION DOMAINS</h4><blockquote><p>Under VxWorks AE, you can call this function from within the kernel protection domain only. In addition, all arguments to this function can reference only that data which is valid in the kernel protection domain. Likewise, the returned value is valid in the protection domain only.This restriction does not apply under non-AE versions of VxWorks. <p></blockquote><h4>RETURNS</h4><blockquote><p><p>The zbuf segment ID of the segment before <i>zbufSeg</i>, or NULL if the operation fails.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./zbufLib.html#top">zbufLib</a></b><hr><a name="zbufSegData"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>zbufSegData( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>zbufSegData( )</strong> - determine the location of data in a zbuf segment</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>caddr_t zbufSegData ( ZBUF_ID zbufId, /* zbuf to examine */ ZBUF_SEG zbufSeg /* segment to get pointer to data */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine returns the location of the first byte of data in the zbufsegment <i>zbufSeg</i>. If <i>zbufSeg</i> is NULL, the location of data in thefirst segment in <i>zbufId</i> is returned.<p></blockquote><h4>VXWORKS AE PROTECTION DOMAINS</h4><blockquote><p>Under VxWorks AE, you can call this function from within the kernel protection domain only. In addition, all arguments to this function can reference only that data which is valid in the kernel protection domain. Likewise, the returned value is valid in the protection domain only.This restriction does not apply under non-AE versions of VxWorks. <p></blockquote><h4>RETURNS</h4><blockquote><p><p>A pointer to the first byte of data in the specified zbuf segment,or NULL if the operation fails.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./zbufLib.html#top">zbufLib</a></b><hr><a name="zbufSegLength"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>zbufSegLength( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>zbufSegLength( )</strong> - determine the length of a zbuf segment</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int zbufSegLength ( ZBUF_ID zbufId, /* zbuf to examine */ ZBUF_SEG zbufSeg /* segment to determine length of */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine returns the number of bytes in the zbuf segment <i>zbufSeg</i>.If <i>zbufSeg</i> is NULL, the length of the first segment in <i>zbufId</i> isreturned.<p></blockquote><h4>VXWORKS AE PROTECTION DOMAINS</h4><blockquote><p>Under VxWorks AE, you can call this function from within the kernel protection domain only. In addition, all arguments to this function can reference only that data which is valid in the kernel protection domain. This restriction does not apply under non-AE versions of VxWorks. <p></blockquote><h4>RETURNS</h4><blockquote><p><p>The number of bytes in the specified zbuf segment,or ERROR if the operation fails.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./zbufLib.html#top">zbufLib</a></b></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?