Home
last modified time | relevance | path

Searched refs:head (Results 1 – 15 of 15) sorted by relevance

/lib/
Dbtree.c93 static unsigned long *btree_node_alloc(struct btree_head *head, gfp_t gfp) in btree_node_alloc() argument
97 node = mempool_alloc(head->mempool, gfp); in btree_node_alloc()
176 static inline void __btree_init(struct btree_head *head) in __btree_init() argument
178 head->node = NULL; in __btree_init()
179 head->height = 0; in __btree_init()
182 void btree_init_mempool(struct btree_head *head, mempool_t *mempool) in btree_init_mempool() argument
184 __btree_init(head); in btree_init_mempool()
185 head->mempool = mempool; in btree_init_mempool()
189 int btree_init(struct btree_head *head) in btree_init() argument
191 __btree_init(head); in btree_init()
[all …]
Dllist.c27 struct llist_head *head) in llist_add_batch() argument
32 new_last->next = first = READ_ONCE(head->first); in llist_add_batch()
33 } while (cmpxchg(&head->first, first, new_first) != first); in llist_add_batch()
53 struct llist_node *llist_del_first(struct llist_head *head) in llist_del_first() argument
57 entry = smp_load_acquire(&head->first); in llist_del_first()
63 entry = cmpxchg(&head->first, old_entry, next); in llist_del_first()
79 struct llist_node *llist_reverse_order(struct llist_node *head) in llist_reverse_order() argument
83 while (head) { in llist_reverse_order()
84 struct llist_node *tmp = head; in llist_reverse_order()
85 head = head->next; in llist_reverse_order()
Dplist.c56 static void plist_check_head(struct plist_head *head) in plist_check_head() argument
58 if (!plist_head_empty(head)) in plist_check_head()
59 plist_check_list(&plist_first(head)->prio_list); in plist_check_head()
60 plist_check_list(&head->node_list); in plist_check_head()
73 void plist_add(struct plist_node *node, struct plist_head *head) in plist_add() argument
76 struct list_head *node_next = &head->node_list; in plist_add()
78 plist_check_head(head); in plist_add()
82 if (plist_head_empty(head)) in plist_add()
85 first = iter = plist_first(head); in plist_add()
103 plist_check_head(head); in plist_add()
[all …]
Dlist_sort.c22 struct list_head *head, **tail = &head; in merge() local
44 return head; in merge()
55 static void merge_final(void *priv, cmp_func cmp, struct list_head *head, in merge_final() argument
58 struct list_head *tail = head; in merge_final()
100 tail->next = head; in merge_final()
101 head->prev = tail; in merge_final()
188 void list_sort(void *priv, struct list_head *head, in list_sort() argument
192 struct list_head *list = head->next, *pending = NULL; in list_sort()
195 if (list == head->prev) /* Zero or one elements */ in list_sort()
199 head->prev->next = NULL; in list_sort()
[all …]
Dtimerqueue.c27 bool timerqueue_add(struct timerqueue_head *head, struct timerqueue_node *node) in timerqueue_add() argument
29 struct rb_node **p = &head->rb_root.rb_root.rb_node; in timerqueue_add()
48 rb_insert_color_cached(&node->node, &head->rb_root, leftmost); in timerqueue_add()
63 bool timerqueue_del(struct timerqueue_head *head, struct timerqueue_node *node) in timerqueue_del() argument
67 rb_erase_cached(&node->node, &head->rb_root); in timerqueue_del()
70 return !RB_EMPTY_ROOT(&head->rb_root.rb_root); in timerqueue_del()
Dtest_list_sort.c75 LIST_HEAD(head); in list_sort_test()
94 list_add_tail(&el->list, &head); in list_sort_test()
97 list_sort(NULL, &head, cmp); in list_sort_test()
100 for (cur = head.next; cur->next != &head; cur = cur->next) { in list_sort_test()
129 if (head.prev != cur) { in list_sort_test()
Drhashtable.c108 static void bucket_table_free_rcu(struct rcu_head *head) in bucket_table_free_rcu() argument
110 bucket_table_free(container_of(head, struct bucket_table, rcu)); in bucket_table_free_rcu()
222 struct rhash_head *head, *next, *entry; in rhashtable_rehash_one() local
249 head = rht_ptr(new_tbl->buckets + new_hash, new_tbl, new_hash); in rhashtable_rehash_one()
251 RCU_INIT_POINTER(entry->next, head); in rhashtable_rehash_one()
488 struct rhash_head *head; in rhashtable_lookup_one() local
492 rht_for_each_from(head, rht_ptr(bkt, tbl, hash), tbl, hash) { in rhashtable_lookup_one()
499 ht->p.obj_cmpfn(&arg, rht_obj(ht, head)) : in rhashtable_lookup_one()
500 rhashtable_compare(&arg, rht_obj(ht, head)))) { in rhashtable_lookup_one()
501 pprev = &head->next; in rhashtable_lookup_one()
[all …]
Dnlattr.c70 static int nla_validate_array(const struct nlattr *head, int len, int maxtype, in nla_validate_array() argument
78 nla_for_each_attr(entry, head, len, rem) { in nla_validate_array()
357 static int __nla_validate_parse(const struct nlattr *head, int len, int maxtype, in __nla_validate_parse() argument
369 nla_for_each_attr(nla, head, len, rem) { in __nla_validate_parse()
419 int __nla_validate(const struct nlattr *head, int len, int maxtype, in __nla_validate() argument
423 return __nla_validate_parse(head, len, maxtype, policy, validate, in __nla_validate()
474 const struct nlattr *head, int len, in __nla_parse() argument
478 return __nla_validate_parse(head, len, maxtype, policy, validate, in __nla_parse()
491 struct nlattr *nla_find(const struct nlattr *head, int len, int attrtype) in nla_find() argument
496 nla_for_each_attr(nla, head, len, rem) in nla_find()
Ddigsig.c75 int head, i; in digsig_verify_rsa() local
161 head = len - l; in digsig_verify_rsa()
162 memset(out1, 0, head); in digsig_verify_rsa()
163 memcpy(out1 + head, p, l); in digsig_verify_rsa()
Dxarray.c250 extern void radix_tree_node_rcu_free(struct rcu_head *head);
555 static int xas_expand(struct xa_state *xas, void *head) in xas_expand() argument
562 if (!head) { in xas_expand()
568 } else if (xa_is_node(head)) { in xas_expand()
569 node = xa_to_node(head); in xas_expand()
574 while (max > max_index(head)) { in xas_expand()
583 if (xa_is_value(head)) in xas_expand()
585 RCU_INIT_POINTER(node->slots[0], head); in xas_expand()
607 if (xa_is_node(head)) { in xas_expand()
608 xa_to_node(head)->offset = 0; in xas_expand()
[all …]
Diov_iter.c865 struct page *head; in page_copy_sane() local
878 head = compound_head(page); in page_copy_sane()
879 v += (page - head) << PAGE_SHIFT; in page_copy_sane()
881 if (likely(n <= v && v <= (page_size(head)))) in page_copy_sane()
Dradix-tree.c299 void radix_tree_node_rcu_free(struct rcu_head *head) in radix_tree_node_rcu_free() argument
302 container_of(head, struct radix_tree_node, rcu_head); in radix_tree_node_rcu_free()
Dassoc_array.c1301 static void assoc_array_rcu_cleanup(struct rcu_head *head) in assoc_array_rcu_cleanup() argument
1304 container_of(head, struct assoc_array_edit, rcu); in assoc_array_rcu_cleanup()
/lib/zlib_deflate/
Ddeflate.c155 s->prev[(str) & s->w_mask] = match_head = s->head[s->ins_h], \
156 s->head[s->ins_h] = (Pos)(str))
163 s->head[s->hash_size-1] = NIL; \
164 memset((char *)s->head, 0, (unsigned)(s->hash_size-1)*sizeof(*s->head));
234 s->head = (Pos *) mem->head_memory; in zlib_deflateInit2()
773 p = &s->head[n]; in fill_window()
Ddefutil.h110 Pos *head; /* Heads of the hash chains or NIL. */ member