#include <string.h>
#include <ccd/compiler.h>
Go to the source code of this file.
|
#define | ccdListEntry(ptr, type, member) ccd_container_of(ptr, type, member) |
|
#define | ccdListForEach(list, item) |
|
#define | ccdListForEachEntry(head, pos, postype, member) |
|
#define | ccdListForEachEntrySafe(head, pos, postype, n, ntype, member) |
|
#define | ccdListForEachSafe(list, item, tmp) |
|
◆ ccdListEntry
#define ccdListEntry |
( |
|
ptr, |
|
|
|
type, |
|
|
|
member |
|
) |
| ccd_container_of(ptr, type, member) |
Get the struct for this entry. : the &ccd_list_t pointer. : the type of the struct this is embedded in. : the name of the list_struct within the struct.
Definition at line 41 of file list.h.
◆ ccdListForEach
#define ccdListForEach |
( |
|
list, |
|
|
|
item |
|
) |
| |
Value:for (item = (list)->
next; \
_ccd_prefetch((item)->
next), item != (list); \
EndPoint * next[3]
the next end point in the end point list
Iterates over list.
Definition at line 47 of file list.h.
◆ ccdListForEachEntry
#define ccdListForEachEntry |
( |
|
head, |
|
|
|
pos, |
|
|
|
postype, |
|
|
|
member |
|
) |
| |
Value: _ccd_prefetch(pos->member.next), &pos->member != (head); \
EndPoint * next[3]
the next end point in the end point list
#define ccdListEntry(ptr, type, member)
Iterates over list of given type. : the type * to use as a loop cursor. : the head for your list. : the name of the list_struct within the struct.
Definition at line 66 of file list.h.
◆ ccdListForEachEntrySafe
#define ccdListForEachEntrySafe |
( |
|
head, |
|
|
|
pos, |
|
|
|
postype, |
|
|
|
n, |
|
|
|
ntype, |
|
|
|
member |
|
) |
| |
Value: &pos->member != (head); \
EndPoint * next[3]
the next end point in the end point list
#define ccdListEntry(ptr, type, member)
Iterates over list of given type safe against removal of list entry : the type * to use as a loop cursor.
: another type * to use as temporary storage : the head for your list. : the name of the list_struct within the struct.
Definition at line 78 of file list.h.
◆ ccdListForEachSafe
#define ccdListForEachSafe |
( |
|
list, |
|
|
|
item, |
|
|
|
tmp |
|
) |
| |
Value:for (item = (list)->
next, tmp = (item)->
next; \
item != (list); \
item = tmp, tmp = (item)->
next)
EndPoint * next[3]
the next end point in the end point list
Iterates over list safe against remove of list entry
Definition at line 55 of file list.h.
◆ ccd_list_t
◆ ccdListAppend()
Appends item to end of the list l.
Definition at line 135 of file list.h.
◆ ccdListDel()
Removes item from list.
Definition at line 143 of file list.h.
◆ ccdListEmpty()
_ccd_inline int ccdListEmpty |
( |
const ccd_list_t * |
head | ) |
|
Returns true if list is empty.
Definition at line 130 of file list.h.
◆ ccdListInit()
Initialize list.
INLINES:
Definition at line 114 of file list.h.
◆ ccdListNext()
◆ ccdListPrev()