• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/iserver/libcsc-0.82.3/src/

Lines Matching refs:list

46 	The csc library's list subsystem; there are functions for managing
51 CSClistNew - create a new libcsc list
52 CSClistDel - remove a libcsc list
53 CSClistRead - read an ASCII format libcsc list
54 CSClistWrite - write a libcsc list in an ASCII format
55 CSClistSetCFunc - set a libcsc list entry data compare function
56 CSClistStat - retrieve libcsc list statistics
57 CSClistPush - create a new entry and push it onto a libcsc list
58 CSClistPop - pop an entry from a libcsc list and retrieve its data
59 CSClistPeek - retrieve data from entry at libcsc list head or tail
60 CSClistNodeNext - find next entry (node) in a libcsc list
61 CSClistNodeFindByValue - find libcsc list entry by data value
62 CSClistNodeFindByReference - find libcsc list entry (node) by reference
63 CSClistNodeStat - retrieve data fields from a libcsc list entry (node)
64 CSClistNodeValidate - verify an entry (node) is really in a libcsc list
65 CSClistNodeDel - remove an entry (node) from a libcsc list
73 Fixed a bug in CSClistNodeNext() wherein the list
280 CSClistType const list,
285 CSClistType const list,
291 CSClistType const list,
296 CSClistType const list,
393 CSClistType const list,
399 ASSERT_RTN (list != NULL, "nodePush: null list", CSC_BADARG);
402 ASSERT_RTN (list->sig_lo == LIST_SIG, "nodePush: list blows", CSC_CORRUPT);
403 ASSERT_RTN (list->sig_hi == LIST_SIG, "nodePush: list blows", CSC_CORRUPT);
408 SUCC(node) = list->head;
409 if (list->head != NULL)
410 PRED(list->head) = node;
413 ASSERT (list->tail == NULL);
414 list->tail = node;
416 list->head = node;
427 CSClistType const list,
435 ASSERT_RTN (list != NULL, "nodePop: null list", CSC_BADARG);
443 ASSERT_RTN (list->sig_lo == LIST_SIG, "nodePop: list blows", CSC_CORRUPT);
444 ASSERT_RTN (list->sig_hi == LIST_SIG, "nodePop: list blows", CSC_CORRUPT);
450 case CSC_LIST_HEAD: node = list->head;
451 if (node != NULL) list->head = SUCC(node);
452 if (list->head != NULL) PRED(list->head) = NULL;
455 case CSC_LIST_TAIL: node = list->tail;
456 if (node != NULL) list->tail = PRED(node);
457 if (list->tail != NULL) SUCC(list->tail) = NULL;
472 CSClistType const list,
478 ASSERT_RTN (list != NULL, "nodeDelink: null list", CSC_BADARG);
481 ASSERT_RTN (list->sig_lo == LIST_SIG, "nodeDelink: list blows", CSC_CORRUPT);
482 ASSERT_RTN (list->sig_hi == LIST_SIG, "nodeDelink: list blows", CSC_CORRUPT);
487 if (node == list->head)
489 if (list->head == list->tail)
492 list->head = NULL;
493 list->tail = NULL;
498 list->head = SUCC(list->head);
499 if (list->head != NULL)
501 PRED(list->head) = NULL;
507 if (node == list->tail)
510 list->tail = PRED(list->tail);
511 if (list->tail != NULL)
513 SUCC(list->tail) = NULL;
540 CSClistType const list,
547 ASSERT_RTN (list != NULL, "nodeValidate: null list", CSC_BADARG);
551 list->sig_lo == LIST_SIG, \
552 "nodeValidate: list blows", \
556 list->sig_hi == LIST_SIG, \
557 "nodeValidate: list blows", \
572 checkNode = list->head;
601 CSClistNew - create a new libcsc list
618 CSClistNew() creates a new list.
622 in the list.
653 ASSERT_RTN (name != NULL, "CSClistNew: no list name", NULL);
700 CSClistDel - remove a libcsc list
706 CSClistType const list
716 CSClistDel() completely removes the libcsc list represented by the
717 opaque `list'.
739 CSClistType const list
744 ASSERT_RTN (list != NULL, "CSClistDel: null list", CSC_BADARG);
746 ASSERT_RTN (list->sig_lo == LIST_SIG, "CSClistDel: list blows", CSC_CORRUPT);
747 ASSERT_RTN (list->sig_hi == LIST_SIG, "CSClistDel: list blows", CSC_CORRUPT);
749 MON_ENTER(list);
753 S_listNodeType* node = list->head;
756 if (nodeValidate(list,node) != CSC_OK) delStat = CSC_CORRUPT;
762 MON_EXIT(list);
771 node = list->head;
775 MON_EXIT(list);
776 tmpStat = CSClistNodeDel (list, node);
777 MON_ENTER(list);
784 CSCmemListType memList = list->memList;
785 CSCmonFnType monFunc = list->monFunc;
786 const void* monData = list->monData;
787 (void)CSCmemFree (memList, (void**)&list, 0);
803 CSClistRead - read an ASCII format libcsc list
810 CSClistType const list
820 CSClistRead() reads from fd a libcsc list in ASCII format that was
823 `list' should be a CSClistType that is set to NULL; a new libcsc
824 list will be created.
847 CSClistType const list
857 ASSERT_RTN (list != NULL, "CSClistRead: null list", CSC_BADARG);
859 ASSERT_RTN (list->sig_lo==LIST_SIG, "CSClistRead: list blows", CSC_CORRUPT);
860 ASSERT_RTN (list->sig_hi==LIST_SIG, "CSClistRead: list blows", CSC_CORRUPT);
862 getStat = CSCioBufRead (fd, &data, &size, list->memList, 0);
866 pushStat = CSClistPush (list, CSC_DATA_NODUP, data, size);
868 getStat = CSCioBufRead (fd, &data, &size, list->memList, 0);
885 CSClistWrite - write a libcsc list in an ASCII format
892 CSClistType const list
902 CSClistWrite() writes to `fd' the libcsc list represented by the opaque
903 `list' in an ASCII format. Small, simple lists will be human-readable
905 another duplicate libcsc list. In this way, libcsc lists can be
908 Caution: client pointers stored in the list will be severe aliasing
932 CSClistType const list
939 ASSERT_RTN (list != NULL, "CSClistWrite: null list", CSC_BADARG);
941 ASSERT_RTN (list->sig_lo==LIST_SIG, "CSClistWrite: list blows", CSC_CORRUPT);
942 ASSERT_RTN (list->sig_hi==LIST_SIG, "CSClistWrite: list blows", CSC_CORRUPT);
944 node = CSClistNodeNext (list, CSC_LIST_HEAD, NULL);
951 node = CSClistNodeNext (list, CSC_LIST_HEAD, node);
965 CSClistSetCFunc - set a libcsc list entry data compare function
971 CSClistType const list,
982 CSClistSetCFunc() sets the client-specified compare function `list'.
984 The client-specified compare function is used by the libcsc list find
988 function that is called from the libcsc list find functions
995 data and a list entry data pointer.
1017 CSClistType const list,
1023 ASSERT_RTN (list != NULL, "CSClistSetCFunc: null list", CSC_BADARG);
1026 list->sig_lo == LIST_SIG, \
1027 "CSClistSetCFunc: list blows", \
1031 list->sig_hi == LIST_SIG, \
1032 "CSClistSetCFunc: list blows", \
1036 MON_ENTER(list);
1037 list->cmpFunc = funcptr;
1038 MON_EXIT(list);
1051 CSClistStat - retrieve libcsc list statistics
1057 CSClistType const list,
1071 CSClistStat() returns some statistics from `list'.
1074 libcsc list pushes to the size_t that is pointed to by `pushCountPtr'.
1077 libcsc list pops to the size_t that is pointed to by `popCountPtr'.
1083 count of bytes in the libcsc list to the size_t that is pointed to by
1106 CSClistType const list,
1115 ASSERT_RTN (list != NULL, "CSClistStat: null list", CSC_BADARG);
1118 list->sig_lo == LIST_SIG, \
1119 "CSClistStat: list blows", \
1123 list->sig_hi == LIST_SIG, \
1124 "CSClistStat: list blows", \
1128 MON_ENTER(list);
1130 if (list->profiling == CSC_DO_PROFILING)
1132 if (pushCountPtr != NULL) *pushCountPtr = list->pushCount;
1133 if (popCountPtr != NULL) *popCountPtr = list->popCount;
1134 if (maxAllocPtr != NULL) *maxAllocPtr = list->maxAlloc;
1135 if (curAllocPtr != NULL) *curAllocPtr = list->curAlloc;
1140 MON_EXIT(list);
1153 CSClistPush - create a new entry and push it onto a libcsc list
1159 CSClistType const list,
1172 CSClistPush() creates a libcsc list entry from `itemPtr' and `itemSize',
1173 and pushes it onto the list pointed to by `list'.
1177 CSC_DATA_NODUP The new list entry simply copies the data
1180 dellocated while the list entry has a pointer
1188 the entry is popped from the list or there will
1193 same list; there may be no way for clients to later tell these entries
1219 CSClistType const list,
1228 ASSERT_RTN (list != NULL, "CSClistPush: null list", CSC_BADARG);
1238 list->sig_lo == LIST_SIG, \
1239 "CSClistPush: list blows", \
1243 list->sig_hi == LIST_SIG, \
1244 "CSClistPush: list blows", \
1248 MON_ENTER(list);
1250 pushStat = nodeNew (list->memList, &node, push, itemPtr, itemSize);
1253 pushStat = nodePush (list, node);
1257 if (list->profiling == CSC_DO_PROFILING)
1259 list->pushCount += 1;
1260 list->curAlloc += itemSize;
1261 if (list->curAlloc > list->maxAlloc) list->maxAlloc = list->curAlloc;
1266 (void)nodeDel (list->memList, node);
1269 MON_EXIT(list);
1282 CSClistPop - pop an entry from a libcsc list and retrieve its data
1288 CSClistType const list,
1301 CSClistPop() pop the head (newest) or tail (oldest) entry from `list'
1308 The entry is removed from `list', and its data is retrieved.
1313 NOTE If the retreived data was pushed into the list with the push
1341 CSClistType const list,
1350 ASSERT_RTN (list != NULL, "CSClistPop: null list", CSC_BADARG);
1360 list->sig_lo == LIST_SIG, \
1361 "CSClistPop: list blows", \
1365 list->sig_hi == LIST_SIG, \
1366 "CSClistPop: list blows", \
1370 MON_ENTER(list);
1372 popStat = nodePop (list, bias, &node);
1393 if (list->profiling == CSC_DO_PROFILING)
1395 list->popCount += 1;
1396 list->curAlloc -= node->size;
1398 (void)nodeDel (list->memList, node);
1405 MON_EXIT(list);
1418 CSClistPeek - retrieve data from entry at libcsc list head or tail
1424 CSClistType const list,
1438 `list' and retrieves the data pointer and size. When bias is:
1441 the list head (newest) entry is written to the void
1445 the list head (newest) entry is written to the size_t
1449 the list tail (oldest) entry is written to the void
1453 the list tail (oldest) entry is written to the size_t
1479 CSClistType const list,
1488 ASSERT_RTN (list!=NULL, "CSClistPeek: null list", CSC_BADARG);
1498 list->sig_lo == LIST_SIG, \
1499 "CSClistPeek: list blows", \
1503 list->sig_hi == LIST_SIG, \
1504 "CSClistPeek: list blows", \
1508 MON_ENTER(list);
1513 case CSC_LIST_HEAD: node = list->head; break;
1514 case CSC_LIST_TAIL: node = list->tail; break;
1525 MON_EXIT(list);
1538 CSClistNodeNext - find next entry (node) in a libcsc list
1544 CSClistType const list,
1550 CSClistNodeNext(), if successful, returns an opaque libcsc list node.
1554 CSClistNodeNext() uses the libcsc list referred to by the opaque `list'
1562 value of `bias') in list is returned.
1564 If `list' has no entries, or there are no more entries (nodes) following
1587 CSClistType const list,
1595 list != NULL, \
1596 "CSClistNodeNext: null list", \
1607 list->sig_lo == LIST_SIG, \
1608 "CSClistNodeNext: list blows", \
1612 list->sig_hi == LIST_SIG, \
1613 "CSClistNodeNext: list blows", \
1617 MON_ENTER(list);
1624 case CSC_LIST_HEAD: nextNode = list->head; break;
1625 case CSC_LIST_TAIL: nextNode = list->tail; break;
1631 if (nodeValidate(list,node) != CSC_OK) nextNode = NULL; else
1647 MON_EXIT(list);
1653 MON_EXIT(list);
1666 CSClistNodeFindByValue - find libcsc list entry by data value
1672 CSClistType const list,
1682 CSClistNodeFindByValue() searches `list' for an entry (node). The
1683 search is either from the head of `list' or the tail; this is specified
1692 implemented by `list's client-specified compare function. If `list'
1696 `list's client-specified compare function is used in this manner:
1698 if ((*list->cfunc) ((void*)itemPtr, (void*)entry->dataPtr) == 0)
1701 If `list's client-specified compare function returns zero, then the
1725 CSClistType const list,
1734 list != NULL, \
1735 "CSClistNodeFindByValue: null list", \
1750 list->sig_lo == LIST_SIG, \
1751 "CSClistNodeFindByValue: list blows", \
1755 list->sig_hi == LIST_SIG, \
1756 "CSClistNodeFindByValue: list blows", \
1760 if (list->cmpFunc == NULL) return (NULL);
1762 MON_ENTER(list);
1767 case CSC_LIST_HEAD: link = list->head; break;
1768 case CSC_LIST_TAIL: link = list->tail; break;
1773 if ((*(list->cmpFunc))((void*)itemPtr,(void*)link->data) == 0)
1784 MON_EXIT(list);
1797 CSClistNodeFindByReference - find libcsc list entry (node) by reference
1803 CSClistType const list,
1813 CSClistNodeFindByReference() searches `list' for an entry (node). The
1814 search is either from the head of `list' or the tail; this is specified
1845 CSClistType const list,
1854 list != NULL, \
1855 "CSClistNodeFindByReference: null list", \
1870 list->sig_lo == LIST_SIG, \
1871 "CSClistNodeFindByReference: list blows", \
1875 list->sig_hi == LIST_SIG, \
1876 "CSClistNodeFindByReference: list blows", \
1880 MON_ENTER(list);
1885 case CSC_LIST_HEAD: link = list->head; break;
1886 case CSC_LIST_TAIL: link = list->tail; break;
1902 MON_EXIT(list);
1915 CSClistNodeStat - retrieve data fields from a libcsc list entry (node)
1933 CSClistNodeStat() retrieves the relevant values of a list entry (node).
1998 CSClistNodeValidate - verify an entry (node) is really in a libcsc list
2004 CSClistType const list,
2015 CSClistNodeValidate() looks up `node' in `list' to validate that `node'
2016 is actually in `list'.
2038 CSClistType const list,
2044 ASSERT_RTN (list != NULL, "CSClistNodeValidate: null list", CSC_BADARG);
2048 list->sig_lo == LIST_SIG, \
2049 "CSClistNodeValidate: list blows", \
2053 list->sig_hi == LIST_SIG, \
2054 "CSClistNodeValidate: list blows", \
2069 MON_ENTER(list);
2071 validStat = nodeValidate (list, node);
2073 MON_EXIT(list);
2086 CSClistNodeDel - remove an entry (node) from a libcsc list
2092 CSClistType const list,
2103 The list entry (node)specified by the opaque `node' is removed from
2104 `list'.
2126 CSClistType const list,
2132 ASSERT_RTN (list != NULL, "CSClistNodeDel: null list", CSC_BADARG);
2136 list->sig_lo == LIST_SIG, \
2137 "CSClistNodeDel: list blows", \
2141 list->sig_hi == LIST_SIG, \
2142 "CSClistNodeDel: list blows", \
2157 MON_ENTER(list);
2160 if (nodeValidate(list,node) != CSC_OK)
2167 delStat = nodeDelink (list, node);
2170 if (list->profiling == CSC_DO_PROFILING)
2172 list->popCount += 1;
2173 list->curAlloc -= node->size;
2175 (void)nodeDel (list->memList, node);
2179 MON_EXIT(list);