#include <unistd.h>
Go to the source code of this file.
Data Structures | |
struct | link |
Doubly linked list head and link type. More... | |
Defines | |
#define | list_foreach(list, iterator) |
#define | list_get_instance(link, type, member) ((type *) (((void *)(link)) - ((void *) &(((type *) NULL)->member)))) |
#define | LIST_INITIALIZE(name) |
Declare and initialize statically allocated list. | |
Typedefs | |
typedef link | link_t |
Doubly linked list head and link type. | |
Functions | |
static void | headless_list_concat (link_t *part1, link_t *part2) |
Concatenate two headless doubly-linked circular lists. | |
static void | headless_list_split (link_t *part1, link_t *part2) |
Split headless doubly-linked circular list. | |
static void | headless_list_split_or_concat (link_t *part1, link_t *part2) |
Split or concatenate headless doubly-linked circular list. | |
static void | link_initialize (link_t *link) |
Initialize doubly-linked circular list link. | |
static void | list_append (link_t *link, link_t *list) |
Add item to the end of doubly-linked circular list. | |
void | list_concat (link_t *head1, link_t *head2) |
Concatenate two lists. | |
unsigned int | list_count (const link_t *link) |
Count list items. | |
static int | list_empty (link_t *list) |
Query emptiness of doubly-linked circular list. | |
static link_t * | list_head (link_t *list) |
Get head item of a list. | |
static void | list_initialize (link_t *list) |
Initialize doubly-linked circular list. | |
static void | list_insert_after (link_t *link, link_t *list) |
Insert item after another item in doubly-linked circular list. | |
static void | list_insert_before (link_t *link, link_t *list) |
Insert item before another item in doubly-linked circular list. | |
int | list_member (const link_t *link, const link_t *head) |
Check for membership. | |
static link_t * | list_nth (link_t *list, unsigned int n) |
Get n-th item of a list. | |
static void | list_prepend (link_t *link, link_t *list) |
Add item to the beginning of doubly-linked circular list. | |
static void | list_remove (link_t *link) |
Remove item from doubly-linked circular list. |
Definition in file list.h.