12#ifndef __METAL_LIST__H__
13#define __METAL_LIST__H__
33#define METAL_INIT_LIST(name) { .next = &name, .prev = &name }
38#define METAL_DECLARE_LIST(name) \
39 struct metal_list name = METAL_INIT_LIST(name)
51 new_node->
next = node;
59 new_node->
prev = node;
79 return list->
next == list;
95#define metal_list_for_each(list, node) \
96 for ((node) = (list)->next; \
98 (node) = (node)->next)
static void metal_list_add_tail(struct metal_list *list, struct metal_list *node)
Definition: list.h:71
static void metal_list_add_after(struct metal_list *node, struct metal_list *new_node)
Definition: list.h:56
static int metal_list_is_empty(struct metal_list *list)
Definition: list.h:77
static void metal_list_add_head(struct metal_list *list, struct metal_list *node)
Definition: list.h:65
static struct metal_list * metal_list_first(struct metal_list *list)
Definition: list.h:90
static void metal_list_del(struct metal_list *node)
Definition: list.h:82
static void metal_list_add_before(struct metal_list *node, struct metal_list *new_node)
Definition: list.h:47
static void metal_list_init(struct metal_list *list)
Definition: list.h:41