libmetal  latest
list.h File Reference
#include <stdbool.h>
#include <stdlib.h>

Go to the source code of this file.

Data Structures

struct  metal_list
 

Macros

#define METAL_INIT_LIST(name)   { .next = &name, .prev = &name }
 
#define METAL_DECLARE_LIST(name)    struct metal_list name = METAL_INIT_LIST(name)
 
#define metal_list_for_each(list, node)
 Used for iterating over a list. More...
 
#define metal_list_for_each_safe(list, temp, node)
 Used for iterating over a list safely. More...
 

Functions

static void metal_list_init (struct metal_list *list)
 
static void metal_list_add_before (struct metal_list *node, struct metal_list *new_node)
 
static void metal_list_add_after (struct metal_list *node, struct metal_list *new_node)
 
static void metal_list_add_head (struct metal_list *list, struct metal_list *node)
 
static void metal_list_add_tail (struct metal_list *list, struct metal_list *node)
 
static int metal_list_is_empty (struct metal_list *list)
 
static void metal_list_del (struct metal_list *node)
 
static struct metal_listmetal_list_first (struct metal_list *list)
 
static bool metal_list_find_node (struct metal_list *list, struct metal_list *node)