Go to the documentation of this file.
18 #ifndef __CCD_LIST_H__
19 #define __CCD_LIST_H__
22 #include <ccd/compiler.h>
41 #define ccdListEntry(ptr, type, member) \
42 ccd_container_of(ptr, type, member)
47 #define ccdListForEach(list, item) \
48 for (item = (list)->next; \
49 _ccd_prefetch((item)->next), item != (list); \
55 #define ccdListForEachSafe(list, item, tmp) \
56 for (item = (list)->next, tmp = (item)->next; \
58 item = tmp, tmp = (item)->next)
66 #define ccdListForEachEntry(head, pos, postype, member) \
67 for (pos = ccdListEntry((head)->next, postype, member); \
68 _ccd_prefetch(pos->member.next), &pos->member != (head); \
69 pos = ccdListEntry(pos->member.next, postype, member))
78 #define ccdListForEachEntrySafe(head, pos, postype, n, ntype, member) \
79 for (pos = ccdListEntry((head)->next, postype, member), \
80 n = ccdListEntry(pos->member.next, postype, member); \
81 &pos->member != (head); \
82 pos = n, n = ccdListEntry(n->member.next, ntype, member))
132 return head->
next == head;
_ccd_inline void ccdListInit(ccd_list_t *l)
struct _ccd_list_t * next
_ccd_inline ccd_list_t * ccdListPrev(ccd_list_t *l)
_ccd_inline ccd_list_t * ccdListNext(ccd_list_t *l)
struct _ccd_list_t * prev
_ccd_inline int ccdListEmpty(const ccd_list_t *head)
_ccd_inline void ccdListDel(ccd_list_t *item)
_ccd_inline void ccdListAppend(ccd_list_t *l, ccd_list_t *item)
fcl
Author(s):
autogenerated on Tue Dec 5 2023 03:40:48