/lib/ |
D | btree.c | 93 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 …]
|
D | timerqueue.c | 39 bool timerqueue_add(struct timerqueue_head *head, struct timerqueue_node *node) in timerqueue_add() argument 41 struct rb_node **p = &head->head.rb_node; in timerqueue_add() 57 rb_insert_color(&node->node, &head->head); in timerqueue_add() 59 if (!head->next || node->expires < head->next->expires) { in timerqueue_add() 60 head->next = node; in timerqueue_add() 75 bool timerqueue_del(struct timerqueue_head *head, struct timerqueue_node *node) in timerqueue_del() argument 80 if (head->next == node) { in timerqueue_del() 83 head->next = rb_entry_safe(rbn, struct timerqueue_node, node); in timerqueue_del() 85 rb_erase(&node->node, &head->head); in timerqueue_del() 87 return head->next != NULL; in timerqueue_del()
|
D | llist.c | 39 struct llist_head *head) in llist_add_batch() argument 44 new_last->next = first = ACCESS_ONCE(head->first); in llist_add_batch() 45 } while (cmpxchg(&head->first, first, new_first) != first); in llist_add_batch() 65 struct llist_node *llist_del_first(struct llist_head *head) in llist_del_first() argument 69 entry = smp_load_acquire(&head->first); in llist_del_first() 75 entry = cmpxchg(&head->first, old_entry, next); in llist_del_first() 91 struct llist_node *llist_reverse_order(struct llist_node *head) in llist_reverse_order() argument 95 while (head) { in llist_reverse_order() 96 struct llist_node *tmp = head; in llist_reverse_order() 97 head = head->next; in llist_reverse_order()
|
D | plist.c | 57 static void plist_check_head(struct plist_head *head) in plist_check_head() argument 59 if (!plist_head_empty(head)) in plist_check_head() 60 plist_check_list(&plist_first(head)->prio_list); in plist_check_head() 61 plist_check_list(&head->node_list); in plist_check_head() 74 void plist_add(struct plist_node *node, struct plist_head *head) in plist_add() argument 77 struct list_head *node_next = &head->node_list; in plist_add() 79 plist_check_head(head); in plist_add() 83 if (plist_head_empty(head)) in plist_add() 86 first = iter = plist_first(head); in plist_add() 104 plist_check_head(head); in plist_add() [all …]
|
D | list_sort.c | 22 struct list_head head, *tail = &head; in merge() local 36 return head.next; in merge() 49 struct list_head *head, in merge_and_restore_back_links() argument 52 struct list_head *tail = head; in merge_and_restore_back_links() 84 tail->next = head; in merge_and_restore_back_links() 85 head->prev = tail; in merge_and_restore_back_links() 102 void list_sort(void *priv, struct list_head *head, in list_sort() argument 112 if (list_empty(head)) in list_sort() 117 head->prev->next = NULL; in list_sort() 118 list = head->next; in list_sort() [all …]
|
D | test_list_sort.c | 74 LIST_HEAD(head); in list_sort_test() 96 list_add_tail(&el->list, &head); in list_sort_test() 99 list_sort(NULL, &head, cmp); in list_sort_test() 102 for (cur = head.next; cur->next != &head; cur = cur->next) { in list_sort_test() 131 if (head.prev != cur) { in list_sort_test()
|
D | rhashtable.c | 147 static void bucket_table_free_rcu(struct rcu_head *head) in bucket_table_free_rcu() argument 149 bucket_table_free(container_of(head, struct bucket_table, rcu)); in bucket_table_free_rcu() 265 struct rhash_head *head, *next, *entry; in rhashtable_rehash_one() local 292 head = rht_dereference_bucket(new_tbl->buckets[new_hash], in rhashtable_rehash_one() 295 RCU_INIT_POINTER(entry->next, head); in rhashtable_rehash_one() 532 struct rhash_head *head; in rhashtable_lookup_one() local 537 rht_for_each_continue(head, *pprev, tbl, hash) { in rhashtable_lookup_one() 544 ht->p.obj_cmpfn(&arg, rht_obj(ht, head)) : in rhashtable_lookup_one() 545 rhashtable_compare(&arg, rht_obj(ht, head)))) { in rhashtable_lookup_one() 546 pprev = &head->next; in rhashtable_lookup_one() [all …]
|
D | digsig.c | 78 int head, i; in digsig_verify_rsa() local 164 head = len - l; in digsig_verify_rsa() 165 memset(out1, 0, head); in digsig_verify_rsa() 166 memcpy(out1 + head, p, l); in digsig_verify_rsa()
|
D | nlattr.c | 154 int nla_validate(const struct nlattr *head, int len, int maxtype, in nla_validate() argument 161 nla_for_each_attr(nla, head, len, rem) { in nla_validate() 217 int nla_parse(struct nlattr **tb, int maxtype, const struct nlattr *head, in nla_parse() argument 226 nla_for_each_attr(nla, head, len, rem) { in nla_parse() 261 struct nlattr *nla_find(const struct nlattr *head, int len, int attrtype) in nla_find() argument 266 nla_for_each_attr(nla, head, len, rem) in nla_find()
|
D | iov_iter.c | 690 struct page *head; in page_copy_sane() local 703 head = compound_head(page); in page_copy_sane() 704 v += (page - head) << PAGE_SHIFT; in page_copy_sane() 706 if (likely(n <= v && v <= (PAGE_SIZE << compound_order(head)))) in page_copy_sane()
|
D | assoc_array.c | 1317 static void assoc_array_rcu_cleanup(struct rcu_head *head) in assoc_array_rcu_cleanup() argument 1320 container_of(head, struct assoc_array_edit, rcu); in assoc_array_rcu_cleanup()
|
D | radix-tree.c | 434 static void radix_tree_node_rcu_free(struct rcu_head *head) in radix_tree_node_rcu_free() argument 437 container_of(head, struct radix_tree_node, rcu_head); in radix_tree_node_rcu_free()
|
/lib/zlib_deflate/ |
D | deflate.c | 155 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()
|
D | defutil.h | 110 Pos *head; /* Heads of the hash chains or NIL. */ member
|