OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | hlist_head |
struct | hlist_node |
struct | list_head |
Macros | |
#define | hlist_entry(ptr, type, member) container_of(ptr, type, member) |
#define | hlist_entry_safe(ptr, type, member) |
#define | hlist_for_each(pos, head) for (pos = (head)->first; pos ; pos = pos->next) |
#define | hlist_for_each_entry(pos, head, member) |
hlist_for_each_entry - iterate over list of given type More... | |
#define | hlist_for_each_entry_continue(pos, member) |
hlist_for_each_entry_continue - iterate over a hlist continuing after current point More... | |
#define | hlist_for_each_entry_from(pos, member) |
hlist_for_each_entry_from - iterate over a hlist continuing from current point More... | |
#define | hlist_for_each_entry_safe(pos, n, head, member) |
hlist_for_each_entry_safe - iterate over list of given type safe against removal of list entry More... | |
#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 More... | |
#define | list_entry_is_head(pos, head, member) (&pos->member == (head)) |
list_entry_is_head - test if the entry points to the head of the list More... | |
#define | list_first_entry(ptr, type, member) list_entry((ptr)->next, type, member) |
list_first_entry - get the first element from a list More... | |
#define | list_first_entry_or_null(ptr, type, member) |
list_first_entry_or_null - get the first element from a list More... | |
#define | list_for_each(pos, head) for (pos = (head)->next; pos != (head); pos = pos->next) |
list_for_each - iterate over a list More... | |
#define | list_for_each_continue(pos, head) for (pos = pos->next; pos != (head); pos = pos->next) |
list_for_each_continue - continue iteration over a list More... | |
#define | list_for_each_entry(pos, head, member) |
list_for_each_entry - iterate over list of given type More... | |
#define | list_for_each_entry_continue(pos, head, member) |
list_for_each_entry_continue - continue iteration over list of given type More... | |
#define | list_for_each_entry_continue_reverse(pos, head, member) |
list_for_each_entry_continue_reverse - iterate backwards from the given point More... | |
#define | list_for_each_entry_direction(forward, pos, head, member) |
list_for_each_entry_direction - iterate forward/backward over list of given type 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 More... | |
#define | list_for_each_entry_from_reverse(pos, head, member) |
list_for_each_entry_from_reverse - iterate backwards over list of given type from the current point 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_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 More... | |
#define | list_for_each_entry_safe_continue(pos, n, head, member) |
list_for_each_entry_safe_continue - continue list iteration safe against removal More... | |
#define | list_for_each_entry_safe_from(pos, n, head, member) |
list_for_each_entry_safe_from - iterate over list from current point safe against removal More... | |
#define | list_for_each_entry_safe_reverse(pos, n, head, member) |
list_for_each_entry_safe_reverse - iterate backwards over list safe against removal More... | |
#define | list_for_each_prev(pos, head) for (pos = (head)->prev; pos != (head); pos = pos->prev) |
list_for_each_prev - iterate over a list backwards More... | |
#define | list_for_each_prev_safe(pos, n, head) |
list_for_each_prev_safe - iterate over a list backwards safe against removal of list entry More... | |
#define | list_for_each_safe(pos, n, head) |
list_for_each_safe - iterate over a list safe against removal of list entry More... | |
#define | LIST_HEAD(name) struct list_head name = LIST_HEAD_INIT(name) |
#define | LIST_HEAD_INIT(name) { &(name), &(name) } |
#define | list_last_entry(ptr, type, member) list_entry((ptr)->prev, type, member) |
list_last_entry - get the last element from a list More... | |
#define | list_next_entry(pos, member) list_entry((pos)->member.next, typeof(*(pos)), member) |
list_next_entry - get the next element in list More... | |
#define | LIST_POISON1 NULL |
#define | LIST_POISON2 NULL |
#define | list_prepare_entry(pos, head, member) ((pos) ? (pos) : list_entry(head, typeof(*pos), member)) |
list_prepare_entry - prepare a pos entry for use in list_for_each_entry_continue() More... | |
#define | list_prev_entry(pos, member) list_entry((pos)->member.prev, typeof(*(pos)), member) |
list_prev_entry - get the prev element in list More... | |
#define | list_safe_reset_next(pos, n, member) n = list_next_entry(pos, member) |
list_safe_reset_next - reset a stale list_for_each_entry_safe loop More... | |
Functions | |
static void | __hlist_del (struct hlist_node *n) |
static void | __list_add (struct list_head *new, struct list_head *prev, struct list_head *next) |
static bool | __list_add_valid (struct list_head *new, struct list_head *prev, struct list_head *next) |
static void | __list_cut_position (struct list_head *list, struct list_head *head, struct list_head *entry) |
static void | __list_del (struct list_head *prev, struct list_head *next) |
static void | __list_del_entry (struct list_head *entry) |
static bool | __list_del_entry_valid (struct list_head *entry) |
static void | __list_splice (const struct list_head *list, struct list_head *prev, struct list_head *next) |
static void | hlist_add_before (struct hlist_node *n, struct hlist_node *next) |
hlist_add_before - add a new entry before the one specified More... | |
static void | hlist_add_behind (struct hlist_node *n, struct hlist_node *prev) |
hlist_add_behind - add a new entry after the one specified More... | |
static void | hlist_add_fake (struct hlist_node *n) |
hlist_add_fake - create a fake hlist consisting of a single headless node More... | |
static void | hlist_add_head (struct hlist_node *n, struct hlist_head *h) |
hlist_add_head - add a new entry at the beginning of the hlist More... | |
static void | hlist_del (struct hlist_node *n) |
hlist_del - Delete the specified hlist_node from its list More... | |
static void | hlist_del_init (struct hlist_node *n) |
hlist_del_init - Delete the specified hlist_node from its list and initialize More... | |
static int | hlist_empty (const struct hlist_head *h) |
hlist_empty - Is the specified hlist_head structure an empty hlist? More... | |
static bool | hlist_fake (struct hlist_node *h) |
hlist_fake: Is this node a fake hlist? More... | |
static bool | hlist_is_singular_node (struct hlist_node *n, struct hlist_head *h) |
hlist_is_singular_node - is node the only element of the specified hlist? More... | |
static void | hlist_move_list (struct hlist_head *old, struct hlist_head *new) |
hlist_move_list - Move an hlist More... | |
static int | hlist_unhashed (const struct hlist_node *h) |
hlist_unhashed - Has node been removed from list and reinitialized? More... | |
static void | INIT_HLIST_NODE (struct hlist_node *h) |
static void | INIT_LIST_HEAD (struct list_head *list) |
INIT_LIST_HEAD - Initialize a list_head structure. More... | |
static void | list_add (struct list_head *new, struct list_head *head) |
list_add - add a new entry More... | |
static void | list_add_tail (struct list_head *new, struct list_head *head) |
list_add_tail - add a new entry More... | |
static void | list_bulk_move_tail (struct list_head *head, struct list_head *first, struct list_head *last) |
list_bulk_move_tail - move a subsection of a list to its tail More... | |
static void | list_cut_before (struct list_head *list, struct list_head *head, struct list_head *entry) |
list_cut_before - cut a list into two, before given entry More... | |
static void | list_cut_position (struct list_head *list, struct list_head *head, struct list_head *entry) |
list_cut_position - cut a list into two More... | |
static void | list_del (struct list_head *entry) |
list_del - deletes entry from list. More... | |
static void | list_del_init (struct list_head *entry) |
list_del_init - deletes entry from list and reinitialize it. More... | |
static void | list_del_init_careful (struct list_head *entry) |
list_del_init_careful - deletes entry from list and reinitialize it. More... | |
static int | list_empty (const struct list_head *head) |
list_empty - tests whether a list is empty More... | |
static int | list_empty_careful (const struct list_head *head) |
list_empty_careful - tests whether a list is empty and not being modified More... | |
static int | list_is_first (const struct list_head *list, const struct list_head *head) |
list_is_first – tests whether list is the first entry in list head More... | |
static int | list_is_last (const struct list_head *list, const struct list_head *head) |
list_is_last - tests whether list is the last entry in list head More... | |
static int | list_is_singular (const struct list_head *head) |
list_is_singular - tests whether a list has just one entry. More... | |
static void | list_move (struct list_head *list, struct list_head *head) |
list_move - delete from one list and add as another's head More... | |
static void | list_move_tail (struct list_head *list, struct list_head *head) |
list_move_tail - delete from one list and add as another's tail More... | |
static void | list_replace (struct list_head *old, struct list_head *new) |
list_replace - replace old entry by new one More... | |
static void | list_replace_init (struct list_head *old, struct list_head *new) |
list_replace_init - replace old entry by new one and initialize the old one More... | |
static void | list_rotate_left (struct list_head *head) |
list_rotate_left - rotate the list to the left More... | |
static void | list_rotate_to_front (struct list_head *list, struct list_head *head) |
list_rotate_to_front() - Rotate list to specific item. More... | |
static void | list_splice (const struct list_head *list, struct list_head *head) |
list_splice - join two lists, this is designed for stacks More... | |
static void | list_splice_init (struct list_head *list, struct list_head *head) |
list_splice_init - join two lists and reinitialise the emptied list. More... | |
static void | list_splice_tail (struct list_head *list, struct list_head *head) |
list_splice_tail - join two lists, each list being a queue More... | |
static void | list_splice_tail_init (struct list_head *list, struct list_head *head) |
list_splice_tail_init - join two lists and reinitialise the emptied list More... | |
static void | list_swap (struct list_head *entry1, struct list_head *entry2) |
list_swap - replace entry1 with entry2 and re-add entry1 at entry2's position More... | |
#define hlist_entry | ( | ptr, | |
type, | |||
member | |||
) | container_of(ptr, type, member) |
#define hlist_entry_safe | ( | ptr, | |
type, | |||
member | |||
) |
#define hlist_for_each | ( | pos, | |
head | |||
) | for (pos = (head)->first; pos ; pos = pos->next) |
#define hlist_for_each_entry | ( | pos, | |
head, | |||
member | |||
) |
hlist_for_each_entry - iterate over list of given type
pos | the type * to use as a loop cursor. |
head | the head for your list. |
member | the name of the hlist_node within the struct. |
#define hlist_for_each_entry_continue | ( | pos, | |
member | |||
) |
hlist_for_each_entry_continue - iterate over a hlist continuing after current point
pos | the type * to use as a loop cursor. |
member | the name of the hlist_node within the struct. |
#define hlist_for_each_entry_from | ( | pos, | |
member | |||
) |
hlist_for_each_entry_from - iterate over a hlist continuing from current point
pos | the type * to use as a loop cursor. |
member | the name of the hlist_node within the struct. |
#define hlist_for_each_entry_safe | ( | pos, | |
n, | |||
head, | |||
member | |||
) |
hlist_for_each_entry_safe - iterate over list of given type safe against removal of list entry
pos | the type * to use as a loop cursor. |
n | a &struct hlist_node to use as temporary storage |
head | the head for your list. |
member | 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 list_entry | ( | ptr, | |
type, | |||
member | |||
) | container_of(ptr, type, member) |
#define list_entry_is_head | ( | pos, | |
head, | |||
member | |||
) | (&pos->member == (head)) |
#define list_first_entry | ( | ptr, | |
type, | |||
member | |||
) | list_entry((ptr)->next, type, member) |
#define list_first_entry_or_null | ( | ptr, | |
type, | |||
member | |||
) |
list_first_entry_or_null - get the first element from a list
ptr | the list head to take the element from. |
type | the type of the struct this is embedded in. |
member | the name of the list_head within the struct. |
Note that if the list is empty, it returns NULL.
#define list_for_each | ( | pos, | |
head | |||
) | for (pos = (head)->next; pos != (head); pos = pos->next) |
#define list_for_each_continue | ( | pos, | |
head | |||
) | for (pos = pos->next; pos != (head); pos = pos->next) |
#define list_for_each_entry | ( | pos, | |
head, | |||
member | |||
) |
list_for_each_entry - iterate over list of given type
pos | the type * to use as a loop cursor. |
head | the head for your list. |
member | the name of the list_head within the struct. |
#define list_for_each_entry_continue | ( | pos, | |
head, | |||
member | |||
) |
list_for_each_entry_continue - continue iteration over list of given type
pos | the type * to use as a loop cursor. |
head | the head for your list. |
member | the name of the list_head 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
pos | the type * to use as a loop cursor. |
head | the head for your list. |
member | the name of the list_head within the struct. |
Start to iterate over list of given type backwards, continuing after the current position.
#define list_for_each_entry_direction | ( | forward, | |
pos, | |||
head, | |||
member | |||
) |
list_for_each_entry_direction - iterate forward/backward over list of given type
forward | the iterate direction, true for forward, false for backward. |
pos | the type * to use as a loop cursor. |
head | the head for your list. |
member | the name of the list_head within the struct. |
#define list_for_each_entry_from | ( | pos, | |
head, | |||
member | |||
) |
list_for_each_entry_from - iterate over list of given type from the current point
pos | the type * to use as a loop cursor. |
head | the head for your list. |
member | the name of the list_head within the struct. |
Iterate over list of given type, continuing from current position.
#define list_for_each_entry_from_reverse | ( | pos, | |
head, | |||
member | |||
) |
list_for_each_entry_from_reverse - iterate backwards over list of given type from the current point
pos | the type * to use as a loop cursor. |
head | the head for your list. |
member | the name of the list_head within the struct. |
Iterate backwards 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.
pos | the type * to use as a loop cursor. |
head | the head for your list. |
member | the name of the list_head 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
pos | the type * to use as a loop cursor. |
n | another type * to use as temporary storage |
head | the head for your list. |
member | the name of the list_head within the struct. |
#define list_for_each_entry_safe_continue | ( | pos, | |
n, | |||
head, | |||
member | |||
) |
list_for_each_entry_safe_continue - continue list iteration safe against removal
pos | the type * to use as a loop cursor. |
n | another type * to use as temporary storage |
head | the head for your list. |
member | the name of the list_head 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 - iterate over list from current point safe against removal
pos | the type * to use as a loop cursor. |
n | another type * to use as temporary storage |
head | the head for your list. |
member | the name of the list_head 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 - iterate backwards over list safe against removal
pos | the type * to use as a loop cursor. |
n | another type * to use as temporary storage |
head | the head for your list. |
member | the name of the list_head within the struct. |
Iterate backwards over list of given type, safe against removal of list entry.
#define list_for_each_prev | ( | pos, | |
head | |||
) | for (pos = (head)->prev; pos != (head); pos = pos->prev) |
#define list_for_each_prev_safe | ( | pos, | |
n, | |||
head | |||
) |
list_for_each_prev_safe - iterate over a list backwards safe against removal of list entry
#define list_for_each_safe | ( | pos, | |
n, | |||
head | |||
) |
list_for_each_safe - iterate over a list safe against removal of list entry
#define LIST_HEAD | ( | name | ) | struct list_head name = LIST_HEAD_INIT(name) |
#define list_last_entry | ( | ptr, | |
type, | |||
member | |||
) | list_entry((ptr)->prev, type, member) |
#define list_next_entry | ( | pos, | |
member | |||
) | list_entry((pos)->member.next, typeof(*(pos)), member) |
#define list_prepare_entry | ( | pos, | |
head, | |||
member | |||
) | ((pos) ? (pos) : list_entry(head, typeof(*pos), member)) |
list_prepare_entry - prepare a pos entry for use in list_for_each_entry_continue()
pos | the type * to use as a start point |
head | the head of the list |
member | the name of the list_head within the struct. |
Prepares a pos entry for use as a start point in list_for_each_entry_continue().
#define list_prev_entry | ( | pos, | |
member | |||
) | list_entry((pos)->member.prev, typeof(*(pos)), member) |
#define list_safe_reset_next | ( | pos, | |
n, | |||
member | |||
) | n = list_next_entry(pos, member) |
list_safe_reset_next - reset a stale list_for_each_entry_safe loop
pos | the loop cursor used in the list_for_each_entry_safe loop |
n | temporary storage used in list_for_each_entry_safe |
member | the name of the list_head within the struct. |
list_safe_reset_next is not safe to use in general if the list may be modified concurrently (eg. the lock is dropped in the loop body). An exception to this is if the cursor element (pos) is pinned in the list, and list_safe_reset_next is called after re-taking the lock and before completing the current iteration of the loop body.
|
inlinestatic |
Definition at line 852 of file list.h.
References hlist_node::next, and hlist_node::pprev.
Referenced by hlist_del(), and hlist_del_init().
|
inlinestatic |
Definition at line 91 of file list.h.
References __list_add_valid(), list_head::next, and hlist_node::next.
Referenced by list_add(), and list_add_tail().
|
inlinestatic |
Definition at line 73 of file list.h.
Referenced by __list_add().
|
inlinestatic |
Definition at line 379 of file list.h.
References list_head::next, and list_head::prev.
Referenced by list_cut_position().
Definition at line 138 of file list.h.
References list_head::next, and hlist_node::next.
Referenced by __list_del_entry().
|
inlinestatic |
Definition at line 146 of file list.h.
References __list_del(), __list_del_entry_valid(), list_head::next, and list_head::prev.
Referenced by list_del(), list_del_init(), list_del_init_careful(), list_move(), and list_move_tail().
|
inlinestatic |
Definition at line 79 of file list.h.
Referenced by __list_del_entry().
|
inlinestatic |
Definition at line 449 of file list.h.
References list_head::next, and list_head::prev.
Referenced by list_splice(), list_splice_init(), list_splice_tail(), and list_splice_tail_init().
|
inlinestatic |
hlist_add_before - add a new entry before the one specified
n | new entry to be added |
next | hlist node to add it before, which must be non-NULL |
Definition at line 913 of file list.h.
References hlist_node::next, and hlist_node::pprev.
|
inlinestatic |
hlist_add_behind - add a new entry after the one specified
n | new entry to be added |
prev | hlist node to add it after, which must be non-NULL |
Definition at line 927 of file list.h.
References hlist_node::next, and hlist_node::pprev.
|
inlinestatic |
hlist_add_fake - create a fake hlist consisting of a single headless node
n | Node to make a fake list out of |
This makes n appear to be its own predecessor on a headless hlist. The point of this is to allow things like hlist_del() to work correctly in cases where there is no list.
Definition at line 946 of file list.h.
References hlist_node::next, and hlist_node::pprev.
|
inlinestatic |
hlist_add_head - add a new entry at the beginning of the hlist
n | new entry to be added |
h | hlist head to add it after |
Insert a new entry after the specified head. This is good for implementing stacks.
Definition at line 898 of file list.h.
References hlist_head::first, hlist_node::next, and hlist_node::pprev.
|
inlinestatic |
hlist_del - Delete the specified hlist_node from its list
n | Node to delete. |
Note that this function leaves the node in hashed state. Use hlist_del_init() or similar instead to unhash n.
Definition at line 869 of file list.h.
References __hlist_del(), LIST_POISON1, LIST_POISON2, hlist_node::next, and hlist_node::pprev.
|
inlinestatic |
hlist_del_init - Delete the specified hlist_node from its list and initialize
n | Node to delete. |
Note that this function leaves the node in unhashed state.
Definition at line 882 of file list.h.
References __hlist_del(), hlist_unhashed(), and INIT_HLIST_NODE().
|
inlinestatic |
hlist_empty - Is the specified hlist_head structure an empty hlist?
h | Structure to check. |
Definition at line 847 of file list.h.
References hlist_head::first.
|
inlinestatic |
hlist_fake: Is this node a fake hlist?
h | Node to check for being a self-referential fake hlist. |
Definition at line 955 of file list.h.
References hlist_node::next, and hlist_node::pprev.
|
inlinestatic |
hlist_is_singular_node - is node the only element of the specified hlist?
n | Node to check for singularity. |
h | Header for potentially singular list. |
Check whether the node is the only node of the head without accessing head, thus avoiding unnecessary cache misses.
Definition at line 969 of file list.h.
References hlist_head::first, hlist_node::next, and hlist_node::pprev.
|
inlinestatic |
hlist_move_list - Move an hlist
old | hlist_head for old list. |
new | hlist_head for new list. |
Move a list from one list head to another. Fixup the pprev reference of the first entry if it exists.
Definition at line 982 of file list.h.
References hlist_head::first, NULL, and hlist_node::pprev.
|
inlinestatic |
hlist_unhashed - Has node been removed from list and reinitialized?
h | Node to be checked |
Not that not all removal functions will leave a node in unhashed state. For example, hlist_nulls_del_init_rcu() does leave the node in unhashed state, but hlist_nulls_del() does not.
Definition at line 836 of file list.h.
References hlist_node::pprev.
Referenced by hlist_del_init().
|
inlinestatic |
Definition at line 822 of file list.h.
References hlist_node::next, NULL, and hlist_node::pprev.
Referenced by hlist_del_init().
|
inlinestatic |
INIT_LIST_HEAD - Initialize a list_head structure.
list | list_head structure to be initialized. |
Initializes the list_head to point to itself. If it is a list header, the result is an empty list.
Definition at line 61 of file list.h.
References list_head::next, and list_head::prev.
Referenced by arc_init_arch_info(), bit_copy_queue_init(), command_init(), dap_cmd_new(), dap_instance_init(), get_dm(), jim_arm_tpiu_swo_create(), jim_target_smp(), list_cut_before(), list_cut_position(), list_del_init(), list_replace_init(), list_splice_init(), list_splice_tail_init(), riscv_info_init(), and vdebug_open().
list_add - add a new entry
new | new entry to be added |
head | list head to add it after |
Insert a new entry after the specified head. This is good for implementing stacks.
Definition at line 112 of file list.h.
References __list_add(), and list_head::next.
Referenced by arm_tpiu_swo_service_new_connection(), dap_cmd_release(), get_dm(), help_add_command(), jtagdp_overrun_check(), list_move(), list_swap(), parse_ranges(), target_register_reset_callback(), and target_register_trace_callback().
list_add_tail - add a new entry
new | new entry to be added |
head | list head to add it before |
Insert a new entry before the specified head. This is useful for implementing queues.
Definition at line 126 of file list.h.
References __list_add(), and list_head::prev.
Referenced by adi_jtag_dp_scan(), arc_reg_add(), arc_reg_data_type_add(), arm_tpiu_swo_create(), bit_copy_queued(), cti_create(), dap_create(), jim_target_smp(), list_move_tail(), or1k_du_adv_register(), or1k_tap_mohor_register(), or1k_tap_vjtag_register(), or1k_tap_xilinx_bscan_register(), telnet_auto_complete(), vdebug_jtag_shift_tap(), and vdebug_reg_read().
|
inlinestatic |
list_bulk_move_tail - move a subsection of a list to its tail
head | the head that will follow our entry |
first | the first entry to move |
last | the last entry to move, can be the same as first |
Move all entries between first and including last before head. All three entries must belong to the same linked list.
Definition at line 256 of file list.h.
References list_head::next, and list_head::prev.
|
inlinestatic |
list_cut_before - cut a list into two, before given entry
list | a new list to add all removed entries |
head | a list with entries |
entry | an entry within head, could be the head itself |
This helper moves the initial part of head, up to but excluding entry, from head to list. You should pass in entry an element you know is on head. list should be an empty list or a list you do not care about losing its data. If entry == head, all entries on head are moved to list.
Definition at line 433 of file list.h.
References INIT_LIST_HEAD(), list_head::next, and list_head::prev.
|
inlinestatic |
list_cut_position - cut a list into two
list | a new list to add all removed entries |
head | a list with entries |
entry | an entry within head, could be the head itself and if so we won't cut the list |
This helper moves the initial part of head, up to and including entry, from head to list. You should pass on entry an element you know is on head. list should be an empty list or a list you do not care about losing its data.
Definition at line 405 of file list.h.
References __list_cut_position(), INIT_LIST_HEAD(), list_empty(), list_is_singular(), and list_head::next.
|
inlinestatic |
list_del - deletes entry from list.
entry | the element to delete from the list. Note: list_empty() on entry does not return true after this, the entry is in an undefined state. |
Definition at line 160 of file list.h.
References __list_del_entry(), LIST_POISON1, LIST_POISON2, list_head::next, and list_head::prev.
Referenced by arm_tpiu_swo_service_connection_closed(), bit_copy_discard(), bit_copy_execute(), dap_cmd_new(), flush_journal(), help_del_all_commands(), help_del_command(), jtag_quit(), list_swap(), target_destroy(), target_unregister_reset_callback(), target_unregister_trace_callback(), vdebug_run_jtag_queue(), and vdebug_run_reg_queue().
|
inlinestatic |
list_del_init - deletes entry from list and reinitialize it.
entry | the element to delete from the list. |
Definition at line 218 of file list.h.
References __list_del_entry(), and INIT_LIST_HEAD().
|
inlinestatic |
list_del_init_careful - deletes entry from list and reinitialize it.
entry | the element to delete from the list. |
This is the same as list_del_init(), except designed to be used together with list_empty_careful() in a way to guarantee ordering of other memory operations.
Any memory operations done before a list_del_init_careful() are guaranteed to be visible after a list_empty_careful() test.
Definition at line 312 of file list.h.
References __list_del_entry(), list_head::next, and list_head::prev.
|
inlinestatic |
list_empty - tests whether a list is empty
head | the list to test. |
Definition at line 296 of file list.h.
References list_head::next.
Referenced by arc_build_bcr_reg_cache(), arc_build_reg_cache(), COMMAND_HANDLER(), dap_cmd_new(), jtagdp_overrun_check(), list_cut_position(), list_is_singular(), list_rotate_left(), list_splice(), list_splice_init(), list_splice_tail(), list_splice_tail_init(), riscv_init_registers(), telnet_auto_complete(), vdebug_run_jtag_queue(), and vdebug_run_reg_queue().
|
inlinestatic |
list_empty_careful - tests whether a list is empty and not being modified
head | the list to test |
Description: tests whether a list is empty and checks that no other CPU might be in the process of modifying either member (next or prev)
NOTE: using list_empty_careful() without synchronization can only be safe if the only activity that can happen to the list entry is list_del_init(). Eg. it cannot be used if another CPU could re-list_add() it.
Definition at line 332 of file list.h.
References list_head::next, and list_head::prev.
|
inlinestatic |
list_is_first – tests whether list is the first entry in list head
list | the entry to test |
head | the head of the list |
Definition at line 275 of file list.h.
References list_head::prev.
|
inlinestatic |
list_is_last - tests whether list is the last entry in list head
list | the entry to test |
head | the head of the list |
Definition at line 286 of file list.h.
References list_head::next.
|
inlinestatic |
list_is_singular - tests whether a list has just one entry.
head | the list to test. |
Definition at line 374 of file list.h.
References list_empty(), list_head::next, and list_head::prev.
Referenced by list_cut_position(), and telnet_auto_complete().
list_move - delete from one list and add as another's head
list | the entry to move |
head | the head that will precede our entry |
Definition at line 229 of file list.h.
References __list_del_entry(), and list_add().
list_move_tail - delete from one list and add as another's tail
list | the entry to move |
head | the head that will follow our entry |
Definition at line 240 of file list.h.
References __list_del_entry(), and list_add_tail().
Referenced by jtagdp_overrun_check(), list_rotate_left(), and list_rotate_to_front().
list_replace - replace old entry by new one
old | the element to be replaced |
new | the new element to insert |
If old was empty, it will be overwritten.
Definition at line 174 of file list.h.
References list_head::next, and list_head::prev.
Referenced by list_replace_init(), and list_swap().
list_replace_init - replace old entry by new one and initialize the old one
old | the element to be replaced |
new | the new element to insert |
If old was empty, it will be overwritten.
Definition at line 190 of file list.h.
References INIT_LIST_HEAD(), and list_replace().
|
inlinestatic |
list_rotate_left - rotate the list to the left
head | the head of the list |
Definition at line 342 of file list.h.
References list_empty(), list_move_tail(), and list_head::next.
Referenced by riscv_init_registers().
list_rotate_to_front() - Rotate list to specific item.
list | The desired new front of the list. |
head | The head of the list. |
Rotates list so that list becomes the new front of the list.
Definition at line 359 of file list.h.
References list_move_tail().
list_splice - join two lists, this is designed for stacks
list | the new list to add. |
head | the place to add it in the first list. |
Definition at line 468 of file list.h.
References __list_splice(), list_empty(), and list_head::next.
list_splice_init - join two lists and reinitialise the emptied list.
list | the new list to add. |
head | the place to add it in the first list. |
The list at list is reinitialised
Definition at line 494 of file list.h.
References __list_splice(), INIT_LIST_HEAD(), list_empty(), and list_head::next.
list_splice_tail - join two lists, each list being a queue
list | the new list to add. |
head | the place to add it in the first list. |
Definition at line 480 of file list.h.
References __list_splice(), list_empty(), and list_head::prev.
list_splice_tail_init - join two lists and reinitialise the emptied list
list | the new list to add. |
head | the place to add it in the first list. |
Each of the lists is a queue. The list at list is reinitialised
Definition at line 511 of file list.h.
References __list_splice(), INIT_LIST_HEAD(), list_empty(), and list_head::prev.
list_swap - replace entry1 with entry2 and re-add entry1 at entry2's position
entry1 | the location to place entry2 |
entry2 | the location to place entry1 |
Definition at line 202 of file list.h.
References list_add(), list_del(), list_replace(), and list_head::prev.