12#ifndef __METAL_LIST__H__
13#define __METAL_LIST__H__
34#define METAL_INIT_LIST(name) { .next = &name, .prev = &name }
39#define METAL_DECLARE_LIST(name) \
40 struct metal_list name = METAL_INIT_LIST(name)
52 new_node->
next = node;
60 new_node->
prev = node;
80 return list->
next == list;
96#define metal_list_for_each(list, node) \
97 for ((node) = (list)->next; \
99 (node) = (node)->next)
static void metal_list_add_tail(struct metal_list *list, struct metal_list *node)
Definition list.h:72
static void metal_list_add_after(struct metal_list *node, struct metal_list *new_node)
Definition list.h:57
static int metal_list_is_empty(struct metal_list *list)
Definition list.h:78
static void metal_list_add_head(struct metal_list *list, struct metal_list *node)
Definition list.h:66
static struct metal_list * metal_list_first(struct metal_list *list)
Definition list.h:91
#define metal_list_for_each(list, node)
Definition list.h:96
static void metal_list_del(struct metal_list *node)
Definition list.h:83
static void metal_list_add_before(struct metal_list *node, struct metal_list *new_node)
Definition list.h:48
static void metal_list_init(struct metal_list *list)
Definition list.h:42
static bool metal_list_find_node(struct metal_list *list, struct metal_list *node)
Definition list.h:101