rtxDList.h File Reference
Detailed Description
Doubly-Linked List Utility Functions.
#include "rtxsrc/osSysTypes.h"
#include "rtxsrc/rtxExternDefs.h"
Go to the source code of this file.
Classes | |
| struct | OSRTDListNode |
| struct | OSRTDList |
| struct | OSRTDListBuf |
| struct | OSRTDListUTF8StrNode |
Defines | |
| #define | DLISTBUF_SEG 16 |
| #define | OSRTDLISTNODESIZE ((sizeof(OSRTDListNode)+7)&(~7)) |
| #define | rtxDListAllocNodeAndData(pctxt, type, ppnode, ppdata) |
| #define | rtxDListAppendData(pctxt, pList, pData) |
| #define | rtxDListFastInit(pList) |
Functions | |
| EXTERNRTX void | rtxDListInit (OSRTDList *pList) |
| EXTERNRTX OSRTDListNode * | rtxDListAppend (struct OSCTXT *pctxt, OSRTDList *pList, void *pData) |
| EXTERNRTX OSRTDListNode * | rtxDListAppendNode (OSRTDList *pList, OSRTDListNode *pListNode) |
| EXTERNRTX OSRTDListNode * | rtxDListInsert (struct OSCTXT *pctxt, OSRTDList *pList, OSUINT32 index, void *pData) |
| EXTERNRTX OSRTDListNode * | rtxDListInsertNode (OSRTDList *pList, OSUINT32 index, OSRTDListNode *pListNode) |
| EXTERNRTX OSRTDListNode * | rtxDListInsertBefore (struct OSCTXT *pctxt, OSRTDList *pList, OSRTDListNode *node, void *pData) |
| EXTERNRTX OSRTDListNode * | rtxDListInsertAfter (struct OSCTXT *pctxt, OSRTDList *pList, OSRTDListNode *node, void *pData) |
| EXTERNRTX OSRTDListNode * | rtxDListFindByIndex (const OSRTDList *pList, OSUINT32 index) |
| EXTERNRTX OSRTDListNode * | rtxDListFindByData (const OSRTDList *pList, void *data) |
| EXTERNRTX int | rtxDListFindIndexByData (const OSRTDList *pList, void *data) |
| EXTERNRTX void | rtxDListFreeNode (struct OSCTXT *pctxt, OSRTDList *pList, OSRTDListNode *node) |
| EXTERNRTX void | rtxDListRemove (OSRTDList *pList, OSRTDListNode *node) |
| EXTERNRTX void | rtxDListFreeNodes (struct OSCTXT *pctxt, OSRTDList *pList) |
| EXTERNRTX void | rtxDListFreeAll (struct OSCTXT *pctxt, OSRTDList *pList) |
| EXTERNRTX int | rtxDListToArray (struct OSCTXT *pctxt, OSRTDList *pList, void **ppArray, OSUINT32 *pElemCount, size_t elemSize) |
| EXTERNRTX int | rtxDListAppendArray (struct OSCTXT *pctxt, OSRTDList *pList, void *pArray, OSUINT32 numElements, size_t elemSize) |
| EXTERNRTX int | rtxDListAppendArrayCopy (struct OSCTXT *pctxt, OSRTDList *pList, const void *pArray, OSUINT32 numElements, size_t elemSize) |
| EXTERNRTX int | rtxDListToUTF8Str (struct OSCTXT *pctxt, OSRTDList *pList, OSUTF8CHAR **ppstr, char sep) |
| EXTERNRTX void | rtxDListBufInit (OSRTDListBuf *pBuf, OSUINT32 segSz, void **ppdata, size_t elemSz) |
| EXTERNRTX int | rtxDListBufExpand (struct OSCTXT *pctxt, OSRTDListBuf *pBuf) |
| EXTERNRTX int | rtxDListBufToArray (struct OSCTXT *pctxt, OSRTDListBuf *pBuf) |
Define Documentation
| #define rtxDListAllocNodeAndData | ( | pctxt, | |||
| type, | |||||
| ppnode, | |||||
| ppdata | ) |
Value:
do { \ *ppnode = (OSRTDListNode*) \ rtxMemAlloc (pctxt, sizeof(type)+OSRTDLISTNODESIZE); \ if (0 != *ppnode) { \ (*ppnode)->data = (void*)((char*)(*ppnode)+OSRTDLISTNODESIZE); \ *ppdata = (type*)((*ppnode)->data); \ } else { *ppdata = 0; } \ } while (0)
| #define rtxDListAppendData | ( | pctxt, | |||
| pList, | |||||
| pData | ) |
Value:
do { \ OSRTDListNode* _node = (OSRTDListNode*) \ (((char*)(pData)) - sizeof(OSRTDListNode)); \ _node->data = pData; \ rtxDListAppendNode (pList, _node); \ } while (0);
| #define rtxDListFastInit | ( | pList | ) |
Value:
do { \ if ((pList) != 0) { \ (pList)->head = (pList)->tail = (OSRTDListNode*) 0; \ (pList)->count = 0; } \ } while (0)
