17#ifndef ZEPHYR_INCLUDE_SYS_SLIST_H_
18#define ZEPHYR_INCLUDE_SYS_SLIST_H_
63#define SYS_SLIST_FOR_EACH_NODE(__sl, __sn) \
64 Z_GENLIST_FOR_EACH_NODE(slist, __sl, __sn)
86#define SYS_SLIST_ITERATE_FROM_NODE(__sl, __sn) \
87 Z_GENLIST_ITERATE_FROM_NODE(slist, __sl, __sn)
105#define SYS_SLIST_FOR_EACH_NODE_SAFE(__sl, __sn, __sns) \
106 Z_GENLIST_FOR_EACH_NODE_SAFE(slist, __sl, __sn, __sns)
116#define SYS_SLIST_CONTAINER(__ln, __cn, __n) \
117 Z_GENLIST_CONTAINER(__ln, __cn, __n)
126#define SYS_SLIST_PEEK_HEAD_CONTAINER(__sl, __cn, __n) \
127 Z_GENLIST_PEEK_HEAD_CONTAINER(slist, __sl, __cn, __n)
136#define SYS_SLIST_PEEK_TAIL_CONTAINER(__sl, __cn, __n) \
137 Z_GENLIST_PEEK_TAIL_CONTAINER(slist, __sl, __cn, __n)
145#define SYS_SLIST_PEEK_NEXT_CONTAINER(__cn, __n) \
146 Z_GENLIST_PEEK_NEXT_CONTAINER(slist, __cn, __n)
162#define SYS_SLIST_FOR_EACH_CONTAINER(__sl, __cn, __n) \
163 Z_GENLIST_FOR_EACH_CONTAINER(slist, __sl, __cn, __n)
180#define SYS_SLIST_FOR_EACH_CONTAINER_SAFE(__sl, __cn, __cns, __n) \
181 Z_GENLIST_FOR_EACH_CONTAINER_SAFE(slist, __sl, __cn, __cns, __n)
202#define SYS_SLIST_STATIC_INIT(ptr_to_list) {NULL, NULL}
211 parent->next = child;
261Z_GENLIST_IS_EMPTY(slist)
274Z_GENLIST_PEEK_NEXT_NO_CHECK(slist, snode)
285Z_GENLIST_PEEK_NEXT(slist, snode)
298Z_GENLIST_PREPEND(slist, snode)
311Z_GENLIST_APPEND(slist, snode)
327 void *head,
void *tail);
329Z_GENLIST_APPEND_LIST(slist, snode)
343Z_GENLIST_MERGE_LIST(slist, snode)
358Z_GENLIST_INSERT(slist, snode)
372Z_GENLIST_GET_NOT_EMPTY(slist, snode)
385Z_GENLIST_GET(slist, snode)
401Z_GENLIST_REMOVE(slist, snode)
417Z_GENLIST_FIND_AND_REMOVE(slist, snode)
static sys_snode_t * sys_slist_get_not_empty(sys_slist_t *list)
Fetch and remove the first node of the given list.
Definition: slist.h:372
static void sys_slist_merge_slist(sys_slist_t *list, sys_slist_t *list_to_append)
merge two slists, appending the second one to the first
Definition: slist.h:343
static sys_snode_t * sys_slist_peek_head(sys_slist_t *list)
Peek the first node from the list.
Definition: slist.h:231
static bool sys_slist_find_and_remove(sys_slist_t *list, sys_snode_t *node)
Find and remove a node from a list.
Definition: slist.h:417
static sys_snode_t * sys_slist_get(sys_slist_t *list)
Fetch and remove the first node of the given list.
Definition: slist.h:385
static sys_snode_t * sys_slist_peek_tail(sys_slist_t *list)
Peek the last node from the list.
Definition: slist.h:243
static sys_snode_t * sys_slist_peek_next_no_check(sys_snode_t *node)
Peek the next node from current node, node is not NULL.
Definition: slist.h:274
static sys_snode_t * sys_slist_peek_next(sys_snode_t *node)
Peek the next node from current node.
Definition: slist.h:285
static bool sys_slist_is_empty(sys_slist_t *list)
Test if the given list is empty.
Definition: slist.h:261
static void sys_slist_append(sys_slist_t *list, sys_snode_t *node)
Append a node to the given list.
Definition: slist.h:311
static void sys_slist_init(sys_slist_t *list)
Initialize a list.
Definition: slist.h:196
static void sys_slist_append_list(sys_slist_t *list, void *head, void *tail)
Append a list to the given list.
Definition: slist.h:329
static void sys_slist_prepend(sys_slist_t *list, sys_snode_t *node)
Prepend a node to the given list.
Definition: slist.h:298
static void sys_slist_insert(sys_slist_t *list, sys_snode_t *prev, sys_snode_t *node)
Insert a node to the given list.
Definition: slist.h:358
static void sys_slist_remove(sys_slist_t *list, sys_snode_t *prev_node, sys_snode_t *node)
Remove a node.
Definition: slist.h:401
struct _slist sys_slist_t
Definition: slist.h:40
struct _snode sys_snode_t
Definition: slist.h:33