#include <stddef.h>
Data Structures | |
struct | list_head |
struct | hlist_head |
struct | hlist_node |
Macros | |
#define | prefetch(x) ((void)0) |
#define | LIST_POISON1 ((void *)0x12345678) |
#define | LIST_POISON2 ((void *)0x87654321) |
#define | LIST_HEAD_INIT(name) { &(name), &(name) } |
#define | LIST_HEAD(name) struct list_head name = LIST_HEAD_INIT(name) |
#define | list_entry(ptr, type, member) container_of(ptr, type, member) |
list_entry - get the struct for this entry : the &struct list_head pointer. More... | |
#define | list_first_entry(ptr, type, member) list_entry((ptr)->next, type, member) |
list_first_entry - get the first element from a list : the list head to take the element from. More... | |
#define | list_for_each_entry(pos, head, member) |
list_for_each_entry - iterate over list of given type : the type * to use as a loop cursor. More... | |
#define | list_for_each_entry_reverse(pos, head, member) |
list_for_each_entry_reverse - iterate backwards over list of given type. More... | |
#define | list_prepare_entry(pos, head, member) ((pos) ? : list_entry(head, typeof(*pos), member)) |
list_prepare_entry - prepare a pos entry for use in list_for_each_entry_continue() : the type * to use as a start point : the head of the list : the name of the list_struct within the struct. More... | |
#define | list_for_each_entry_continue(pos, head, member) |
list_for_each_entry_continue - continue iteration over list of given type : the type * to use as a loop cursor. More... | |
#define | list_for_each_entry_continue_reverse(pos, head, member) |
list_for_each_entry_continue_reverse - iterate backwards from the given point : the type * to use as a loop cursor. More... | |
#define | list_for_each_entry_from(pos, head, member) |
list_for_each_entry_from - iterate over list of given type from the current point : the type * to use as a loop cursor. More... | |
#define | list_for_each_entry_safe(pos, n, head, member) |
list_for_each_entry_safe - iterate over list of given type safe against removal of list entry : the type * to use as a loop cursor. More... | |
#define | list_for_each_entry_safe_continue(pos, n, head, member) |
list_for_each_entry_safe_continue : the type * to use as a loop cursor. More... | |
#define | list_for_each_entry_safe_from(pos, n, head, member) |
list_for_each_entry_safe_from : the type * to use as a loop cursor. More... | |
#define | list_for_each_entry_safe_reverse(pos, n, head, member) |
list_for_each_entry_safe_reverse : the type * to use as a loop cursor. More... | |
#define | HLIST_HEAD_INIT { .first = NULL } |
#define | HLIST_HEAD(name) struct hlist_head name = { .first = NULL } |
#define | init_hlist_head(ptr) ((ptr)->first = NULL) |
#define | hlist_entry(ptr, type, member) container_of(ptr,type,member) |
#define | hlist_for_each(pos, head) |
#define | hlist_for_each_safe(pos, n, head) |
#define | hlist_for_each_entry(tpos, pos, head, member) |
hlist_for_each_entry - iterate over list of given type : the type * to use as a loop cursor. More... | |
#define | hlist_for_each_entry_continue(tpos, pos, member) |
hlist_for_each_entry_continue - iterate over a hlist continuing after current point : the type * to use as a loop cursor. More... | |
#define | hlist_for_each_entry_from(tpos, pos, member) |
hlist_for_each_entry_from - iterate over a hlist continuing from current point : the type * to use as a loop cursor. More... | |
#define | hlist_for_each_entry_safe(tpos, pos, n, head, member) |
hlist_for_each_entry_safe - iterate over list of given type safe against removal of list entry : the type * to use as a loop cursor. More... | |
#define hlist_entry | ( | ptr, | |
type, | |||
member | |||
) | container_of(ptr,type,member) |
#define hlist_for_each | ( | pos, | |
head | |||
) |
#define hlist_for_each_entry | ( | tpos, | |
pos, | |||
head, | |||
member | |||
) |
hlist_for_each_entry - iterate over list of given type : the type * to use as a loop cursor.
: the &struct hlist_node to use as a loop cursor. : the head for your list. : the name of the hlist_node within the struct.
#define hlist_for_each_entry_continue | ( | tpos, | |
pos, | |||
member | |||
) |
hlist_for_each_entry_continue - iterate over a hlist continuing after current point : the type * to use as a loop cursor.
: the &struct hlist_node to use as a loop cursor. : the name of the hlist_node within the struct.
#define hlist_for_each_entry_from | ( | tpos, | |
pos, | |||
member | |||
) |
hlist_for_each_entry_from - iterate over a hlist continuing from current point : the type * to use as a loop cursor.
: the &struct hlist_node to use as a loop cursor. : the name of the hlist_node within the struct.
#define hlist_for_each_entry_safe | ( | tpos, | |
pos, | |||
n, | |||
head, | |||
member | |||
) |
hlist_for_each_entry_safe - iterate over list of given type safe against removal of list entry : the type * to use as a loop cursor.
: the &struct hlist_node to use as a loop cursor.
: another &struct hlist_node to use as temporary storage : the head for your list. : the name of the hlist_node within the struct.
#define hlist_for_each_safe | ( | pos, | |
n, | |||
head | |||
) |
#define HLIST_HEAD | ( | name | ) | struct hlist_head name = { .first = NULL } |
#define HLIST_HEAD_INIT { .first = NULL } |
#define init_hlist_head | ( | ptr | ) | ((ptr)->first = NULL) |
#define list_entry | ( | ptr, | |
type, | |||
member | |||
) | container_of(ptr, type, member) |
list_entry - get the struct for this entry : the &struct list_head pointer.
: the type of the struct this is embedded in. : the name of the list_struct within the struct.
#define list_first_entry | ( | ptr, | |
type, | |||
member | |||
) | list_entry((ptr)->next, type, member) |
list_first_entry - get the first element from a list : the list head to take the element from.
: the type of the struct this is embedded in. : the name of the list_struct within the struct.
Note, that list is expected to be not empty.
#define list_for_each_entry | ( | pos, | |
head, | |||
member | |||
) |
list_for_each_entry - iterate over list of given type : the type * to use as a loop cursor.
: the head for your list. : the name of the list_struct within the struct.
#define list_for_each_entry_continue | ( | pos, | |
head, | |||
member | |||
) |
list_for_each_entry_continue - continue iteration over list of given type : the type * to use as a loop cursor.
: the head for your list. : the name of the list_struct within the struct.
Continue to iterate over list of given type, continuing after the current position.
#define list_for_each_entry_continue_reverse | ( | pos, | |
head, | |||
member | |||
) |
list_for_each_entry_continue_reverse - iterate backwards from the given point : the type * to use as a loop cursor.
: the head for your list. : the name of the list_struct within the struct.
Start to iterate over list of given type backwards, continuing after the current position.
#define list_for_each_entry_from | ( | pos, | |
head, | |||
member | |||
) |
list_for_each_entry_from - iterate over list of given type from the current point : the type * to use as a loop cursor.
: the head for your list. : the name of the list_struct within the struct.
Iterate over list of given type, continuing from current position.
#define list_for_each_entry_reverse | ( | pos, | |
head, | |||
member | |||
) |
list_for_each_entry_reverse - iterate backwards over list of given type.
: the type * to use as a loop cursor. : the head for your list. : the name of the list_struct within the struct.
#define list_for_each_entry_safe | ( | pos, | |
n, | |||
head, | |||
member | |||
) |
list_for_each_entry_safe - iterate over list of given type safe against removal of list entry : the type * to use as a loop cursor.
: another type * to use as temporary storage : the head for your list. : the name of the list_struct within the struct.
#define list_for_each_entry_safe_continue | ( | pos, | |
n, | |||
head, | |||
member | |||
) |
list_for_each_entry_safe_continue : the type * to use as a loop cursor.
: another type * to use as temporary storage : the head for your list. : the name of the list_struct within the struct.
Iterate over list of given type, continuing after current point, safe against removal of list entry.
#define list_for_each_entry_safe_from | ( | pos, | |
n, | |||
head, | |||
member | |||
) |
list_for_each_entry_safe_from : the type * to use as a loop cursor.
: another type * to use as temporary storage : the head for your list. : the name of the list_struct within the struct.
Iterate over list of given type from current point, safe against removal of list entry.
#define list_for_each_entry_safe_reverse | ( | pos, | |
n, | |||
head, | |||
member | |||
) |
list_for_each_entry_safe_reverse : the type * to use as a loop cursor.
: another type * to use as temporary storage : the head for your list. : the name of the list_struct within the struct.
Iterate backwards over list of given type, safe against removal of list entry.
#define LIST_POISON1 ((void *)0x12345678) |
#define LIST_POISON2 ((void *)0x87654321) |
#define list_prepare_entry | ( | pos, | |
head, | |||
member | |||
) | ((pos) ? : list_entry(head, typeof(*pos), member)) |
list_prepare_entry - prepare a pos entry for use in list_for_each_entry_continue() : the type * to use as a start point : the head of the list : the name of the list_struct within the struct.
Prepares a pos entry for use as a start point in list_for_each_entry_continue().
#define prefetch | ( | x | ) | ((void)0) |