#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. @ptr: the &ccd_list_t pointer. @type: the type of the struct this is embedded in. @member: 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); \
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); \
Iterates over list of given type. @pos: the type * to use as a loop cursor. @head: the head for your list. @member: 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); \
Iterates over list of given type safe against removal of list entry @pos: the type * to use as a loop cursor.
: another type * to use as temporary storage @head: the head for your list. @member: 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)
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()