Lines Matching +full:entry +full:- +full:name

1 /* SPDX-License-Identifier: GPL-2.0 */
16 * using the generic single-entry routines.
23 #define LIST_HEAD_INIT(name) { &(name), &(name) } argument
25 #define LIST_HEAD(name) \ argument
26 struct list_head name = LIST_HEAD_INIT(name)
30 list->next = list; in INIT_LIST_HEAD()
31 list->prev = list; in INIT_LIST_HEAD()
35 * Insert a new entry between two known consecutive entries.
44 next->prev = new; in __list_add()
45 new->next = next; in __list_add()
46 new->prev = prev; in __list_add()
47 prev->next = new; in __list_add()
51 * list_add - add a new entry
52 * @new: new entry to be added
55 * Insert a new entry after the specified head.
60 __list_add(new, head, head->next); in list_add()
64 * Delete a list entry by making the prev/next entries
72 next->prev = prev; in __list_del()
73 prev->next = next; in __list_del()
81 * list_del - deletes entry from list.
82 * @entry: the element to delete from the list.
83 * Note: list_empty() on entry does not return true after this, the entry is
86 static inline void __list_del_entry(struct list_head *entry) in __list_del_entry() argument
88 __list_del(entry->prev, entry->next); in __list_del_entry()
91 static inline void list_del(struct list_head *entry) in list_del() argument
93 __list_del(entry->prev, entry->next); in list_del()
94 entry->next = LIST_POISON1; in list_del()
95 entry->prev = LIST_POISON2; in list_del()
99 * list_entry - get the struct for this entry
102 * @member: the name of the list_head within the struct.
107 * list_for_each - iterate over a list
112 for (pos = (head)->next; pos != (head); pos = pos->next)
115 * list_for_each_safe - iterate over a list safe against removal of list entry
121 for (pos = (head)->next, n = pos->next; pos != (head); \
122 pos = n, n = pos->next)
124 #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
127 * container_of - cast a member of a structure out to the containing structure
130 * @member: the name of the member within the struct.
134 const typeof( ((type *)0)->member ) *__mptr = (ptr); \
135 (type *)( (char *)__mptr - offsetof(type,member) );})