lstlib.html
来自「vxworks相关论文」· HTML 代码 · 共 486 行 · 第 1/2 页
HTML
486 行
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/lstLib.html - generated by refgen from lstLib.c --> <title> lstLib </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>lstLib</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>lstLib</strong> - doubly linked list subroutine library </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><i><a href="./lstLib.html#lstInit">lstInit</a></i>( )</b> - initialize a list descriptor<br><b><i><a href="./lstLib.html#lstAdd">lstAdd</a></i>( )</b> - add a node to the end of a list<br><b><i><a href="./lstLib.html#lstConcat">lstConcat</a></i>( )</b> - concatenate two lists<br><b><i><a href="./lstLib.html#lstCount">lstCount</a></i>( )</b> - report the number of nodes in a list<br><b><i><a href="./lstLib.html#lstDelete">lstDelete</a></i>( )</b> - delete a specified node from a list<br><b><i><a href="./lstLib.html#lstExtract">lstExtract</a></i>( )</b> - extract a sublist from a list<br><b><i><a href="./lstLib.html#lstFirst">lstFirst</a></i>( )</b> - find first node in list<br><b><i><a href="./lstLib.html#lstGet">lstGet</a></i>( )</b> - delete and return the first node from a list<br><b><i><a href="./lstLib.html#lstInsert">lstInsert</a></i>( )</b> - insert a node in a list after a specified node<br><b><i><a href="./lstLib.html#lstLast">lstLast</a></i>( )</b> - find the last node in a list<br><b><i><a href="./lstLib.html#lstNext">lstNext</a></i>( )</b> - find the next node in a list<br><b><i><a href="./lstLib.html#lstNth">lstNth</a></i>( )</b> - find the Nth node in a list<br><b><i><a href="./lstLib.html#lstPrevious">lstPrevious</a></i>( )</b> - find the previous node in a list<br><b><i><a href="./lstLib.html#lstNStep">lstNStep</a></i>( )</b> - find a list node <i>nStep</i> steps away from a specified node<br><b><i><a href="./lstLib.html#lstFind">lstFind</a></i>( )</b> - find a node in a list<br><b><i><a href="./lstLib.html#lstFree">lstFree</a></i>( )</b> - free up a list<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This subroutine library supports the creation and maintenance of adoubly linked list. The user supplies a list descriptor (type LIST)that will contain pointers to the first and last nodes in the list,and a count of the number of nodes in the list. The nodes in thelist can be any user-defined structure, but they must reserve spacefor two pointers as their first elements. Both the forward andbackward chains are terminated with a NULL pointer.<p>The linked-list library simply manipulates the linked-list data structures;no kernel functions are invoked. In particular, linked lists by themselvesprovide no task synchronization or mutual exclusion. If multiple tasks willaccess a single linked list, that list must be guarded with somemutual-exclusion mechanism (e.g., a mutual-exclusion semaphore).<p></blockquote><h4>NON-EMPTY LIST</h4><blockquote><p><p><pre> --------- -------- -------- | head--------------->| next----------->| next--------- | | | | | | | | | ------- prev |<---------- prev | | | | | | | | | | | tail------ | | ... | ----->| ... | | | | | v | v |count=2| | ----- | ----- --------- | --- | --- | - | - | | ------------------------</pre></blockquote><h4>EMPTY LIST</h4><blockquote><p><p><pre> ----------- | head------------------ | | | | tail---------- | | | | v | count=0 | ----- ----- ----------- --- --- - -</pre></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>lstLib.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./lstLib.html#top">lstLib</a></b><hr><a name="lstInit"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>lstInit</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>lstInit</i>( )</strong> - initialize a list descriptor</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void lstInit ( LIST * pList /* ptr to list descriptor to be initialized */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine initializes a specified list to an empty list.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./lstLib.html#top">lstLib</a></b><hr><a name="lstAdd"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>lstAdd</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>lstAdd</i>( )</strong> - add a node to the end of a list</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void lstAdd ( LIST * pList, /* pointer to list descriptor */ NODE * pNode /* pointer to node to be added */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine adds a specified node to the end of a specified list.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./lstLib.html#top">lstLib</a></b><hr><a name="lstConcat"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>lstConcat</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>lstConcat</i>( )</strong> - concatenate two lists</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void lstConcat ( LIST * pDstList, /* destination list */ LIST * pAddList /* list to be added to dstList */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine concatenates the second list to the end of the first list.The second list is left empty. Either list (or both) can beempty at the beginning of the operation.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./lstLib.html#top">lstLib</a></b><hr><a name="lstCount"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>lstCount</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>lstCount</i>( )</strong> - report the number of nodes in a list</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int lstCount ( LIST * pList /* pointer to list descriptor */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine returns the number of nodes in a specified list.<p></blockquote><h4>RETURNS</h4><blockquote><p><p>The number of nodes in the list.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./lstLib.html#top">lstLib</a></b><hr><a name="lstDelete"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>lstDelete</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>lstDelete</i>( )</strong> - delete a specified node from a list</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void lstDelete ( LIST * pList, /* pointer to list descriptor */ NODE * pNode /* pointer to node to be deleted */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine deletes a specified node from a specified list.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./lstLib.html#top">lstLib</a></b><hr><a name="lstExtract"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>lstExtract</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>lstExtract</i>( )</strong> - extract a sublist from a list</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void lstExtract ( LIST * pSrcList, /* pointer to source list */ NODE * pStartNode, /* first node in sublist to be extracted */ NODE * pEndNode, /* last node in sublist to be extracted */ LIST * pDstList /* ptr to list where to put extracted list */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine extracts the sublist that starts with <i>pStartNode</i> and endswith <i>pEndNode</i> from a source list. It places the extracted list in<i>pDstList</i>.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./lstLib.html#top">lstLib</a></b><hr><a name="lstFirst"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>lstFirst</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>lstFirst</i>( )</strong> - find first node in list</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>NODE *lstFirst ( LIST * pList /* pointer to list descriptor */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine finds the first node in a linked list.<p>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?