|
#define | VLC_LIST_INITIALIZER(h) { h, h } |
| Static initializer for a list head. More...
|
|
#define | vlc_list_entry_aligned_size(p) ((sizeof (*(p)) + sizeof (max_align_t) - 1) / sizeof (max_align_t)) |
|
#define | vlc_list_entry_dummy(p) (0 ? (p) : ((void *)(&(max_align_t[vlc_list_entry_aligned_size(p)]){0}))) |
|
#define | vlc_list_offset_p(p, member) ((p) = vlc_list_entry_dummy(p), (char *)(&(p)->member) - (char *)(p)) |
|
#define | vlc_list_entry_p(node, p, member) (0 ? (p) : (void *)(((char *)(node)) - vlc_list_offset_p(p, member))) |
|
#define | vlc_list_foreach(pos, head, member) |
| List iteration macro. More...
|
|
#define | vlc_list_entry(ptr, type, member) container_of(ptr, type, member) |
| Converts a list node pointer to an element pointer. More...
|
|
#define | vlc_list_first_entry_or_null(head, type, member) ((type *)vlc_list_first_or_null(head, offsetof (type, member))) |
| Gets the first element. More...
|
|
#define | vlc_list_last_entry_or_null(head, type, member) ((type *)vlc_list_last_or_null(head, offsetof (type, member))) |
| Gets the last element. More...
|
|
#define | vlc_list_prev_entry_or_null(head, entry, type, member) |
|
#define | vlc_list_next_entry_or_null(head, entry, type, member) |
|
|
static void | vlc_list_init (struct vlc_list *restrict head) |
| Initializes an empty list head. More...
|
|
static void | vlc_list_add_between (struct vlc_list *restrict node, struct vlc_list *prev, struct vlc_list *next) |
| Inserts an element in a list. More...
|
|
static void | vlc_list_add_after (struct vlc_list *restrict node, struct vlc_list *prev) |
| Inserts an element after another. More...
|
|
static void | vlc_list_add_before (struct vlc_list *restrict node, struct vlc_list *next) |
| Inserts an element before another. More...
|
|
static void | vlc_list_append (struct vlc_list *restrict node, struct vlc_list *head) |
| Appends an element into a list. More...
|
|
static void | vlc_list_prepend (struct vlc_list *restrict node, struct vlc_list *head) |
| Prepends an element into a list. More...
|
|
static void | vlc_list_remove (struct vlc_list *restrict node) |
| Removes an element from a list. More...
|
|
static void | vlc_list_replace (const struct vlc_list *original, struct vlc_list *restrict substitute) |
| Replaces an element with another one. More...
|
|
static bool | vlc_list_is_empty (const struct vlc_list *head) |
| Checks if a list is empty. More...
|
|
static bool | vlc_list_is_first (const struct vlc_list *node, const struct vlc_list *head) |
| Checks if an element is first in a list. More...
|
|
static bool | vlc_list_is_last (const struct vlc_list *node, const struct vlc_list *head) |
| Checks if an element is last in a list. More...
|
|
static struct vlc_list_it | vlc_list_it_start (const struct vlc_list *head) |
|
static bool | vlc_list_it_continue (const struct vlc_list_it *restrict it) |
|
static void | vlc_list_it_next (struct vlc_list_it *restrict it) |
|
static void * | vlc_list_first_or_null (const struct vlc_list *head, size_t offset) |
|
static void * | vlc_list_last_or_null (const struct vlc_list *head, size_t offset) |
|
static void * | vlc_list_prev_or_null (const struct vlc_list *head, struct vlc_list *node, size_t offset) |
|
static void * | vlc_list_next_or_null (const struct vlc_list *head, struct vlc_list *node, size_t offset) |
|
This provides convenience helpers for linked lists.