Lines Matching defs:h
344 static unsigned n_buckets(HashmapBase *h) { in n_buckets()
349 static unsigned n_entries(HashmapBase *h) { in n_entries()
354 static void n_entries_inc(HashmapBase *h) { in n_entries_inc()
361 static void n_entries_dec(HashmapBase *h) { in n_entries_dec()
368 static char *storage_ptr(HashmapBase *h) { in storage_ptr()
373 static uint8_t *hash_key(HashmapBase *h) { in hash_key()
378 static unsigned base_bucket_hash(HashmapBase *h, const void *p) { in base_bucket_hash()
381 #define bucket_hash(h, p) base_bucket_hash(HASHMAP_BASE(h), p) argument
402 static struct hashmap_base_entry *bucket_at(HashmapBase *h, unsigned idx) { in bucket_at()
407 static struct plain_hashmap_entry *plain_bucket_at(Hashmap *h, unsigned idx) { in plain_bucket_at()
411 static struct ordered_hashmap_entry *ordered_bucket_at(OrderedHashmap *h, unsigned idx) { in ordered_bucket_at()
415 static struct set_entry *set_bucket_at(Set *h, unsigned idx) { in set_bucket_at()
425 static struct hashmap_base_entry *bucket_at_virtual(HashmapBase *h, struct swap_entries *swap, in bucket_at_virtual()
436 static dib_raw_t *dib_raw_ptr(HashmapBase *h) { in dib_raw_ptr()
441 static unsigned bucket_distance(HashmapBase *h, unsigned idx, unsigned from) { in bucket_distance()
446 static unsigned bucket_calculate_dib(HashmapBase *h, unsigned idx, dib_raw_t raw_dib) { in bucket_calculate_dib()
469 static void bucket_set_dib(HashmapBase *h, unsigned idx, unsigned dib) { in bucket_set_dib()
470 dib_raw_ptr(h)[idx] = dib != DIB_FREE ? MIN(dib, DIB_RAW_OVERFLOW) : DIB_RAW_FREE; in bucket_set_dib() local
473 static unsigned skip_free_buckets(HashmapBase *h, unsigned idx) { in skip_free_buckets()
485 static void bucket_mark_free(HashmapBase *h, unsigned idx) { in bucket_mark_free()
490 static void bucket_move_entry(HashmapBase *h, struct swap_entries *swap, in bucket_move_entry()
526 static unsigned next_idx(HashmapBase *h, unsigned idx) { in next_idx()
530 static unsigned prev_idx(HashmapBase *h, unsigned idx) { in prev_idx()
534 static void *entry_value(HashmapBase *h, struct hashmap_base_entry *e) { in entry_value()
549 static void base_remove_entry(HashmapBase *h, unsigned idx) { in base_remove_entry()
601 #define remove_entry(h, idx) base_remove_entry(HASHMAP_BASE(h), idx) argument
603 static unsigned hashmap_iterate_in_insertion_order(OrderedHashmap *h, Iterator *i) { in hashmap_iterate_in_insertion_order()
654 static unsigned hashmap_iterate_in_internal_order(HashmapBase *h, Iterator *i) { in hashmap_iterate_in_internal_order()
709 static unsigned hashmap_iterate_entry(HashmapBase *h, Iterator *i) { in hashmap_iterate_entry()
735 void *internal_hashmap_iterate(HashmapBase *h, Iterator *i, const void **key) { in internal_hashmap_iterate()
760 #define HASHMAP_FOREACH_IDX(idx, h, i) \ argument
765 static void reset_direct_storage(HashmapBase *h) { in reset_direct_storage()
776 HashmapBase *h; in hashmap_base_new() local
825 static int hashmap_base_ensure_allocated(HashmapBase **h, const struct hash_ops *hash_ops, in hashmap_base_ensure_allocated()
842 int internal_hashmap_ensure_allocated(Hashmap **h, const struct hash_ops *hash_ops HASHMAP_DEBUG_P… in internal_hashmap_ensure_allocated()
846 int internal_ordered_hashmap_ensure_allocated(OrderedHashmap **h, const struct hash_ops *hash_ops … in internal_ordered_hashmap_ensure_allocated()
854 static void hashmap_free_no_clear(HashmapBase *h) { in hashmap_free_no_clear()
868 HashmapBase *internal_hashmap_free(HashmapBase *h) { in internal_hashmap_free()
880 HashmapBase *internal_hashmap_free_free(HashmapBase *h) { in internal_hashmap_free_free()
893 Hashmap *hashmap_free_free_free(Hashmap *h) { in hashmap_free_free_free()
905 void internal_hashmap_clear(HashmapBase *h) { in internal_hashmap_clear()
923 void internal_hashmap_clear_free(HashmapBase *h) { in internal_hashmap_clear_free()
936 void hashmap_clear_free_free(Hashmap *h) { in hashmap_clear_free_free()
963 static bool hashmap_put_robin_hood(HashmapBase *h, unsigned idx, in hashmap_put_robin_hood()
1021 static int hashmap_base_put_boldly(HashmapBase *h, unsigned idx, in hashmap_base_put_boldly()
1067 #define hashmap_put_boldly(h, idx, swap, may_resize) \ argument
1075 static int resize_buckets(HashmapBase *h, unsigned entries_add) { in resize_buckets()
1213 static unsigned base_bucket_scan(HashmapBase *h, unsigned idx, const void *key) { in base_bucket_scan()
1237 #define bucket_scan(h, idx, key) base_bucket_scan(HASHMAP_BASE(h), idx, key) argument
1239 int hashmap_put(Hashmap *h, const void *key, void *value) { in hashmap_put()
1278 int hashmap_replace(Hashmap *h, const void *key, void *value) { in hashmap_replace()
1310 int hashmap_update(Hashmap *h, const void *key, void *value) { in hashmap_update()
1326 void *internal_hashmap_get(HashmapBase *h, const void *key) { in internal_hashmap_get()
1342 void *hashmap_get2(Hashmap *h, const void *key, void **key2) { in hashmap_get2()
1361 bool internal_hashmap_contains(HashmapBase *h, const void *key) { in internal_hashmap_contains()
1371 void *internal_hashmap_remove(HashmapBase *h, const void *key) { in internal_hashmap_remove()
1391 void *hashmap_remove2(Hashmap *h, const void *key, void **rkey) { in hashmap_remove2()
1420 int hashmap_remove_and_put(Hashmap *h, const void *old_key, const void *new_key, void *value) { in hashmap_remove_and_put()
1473 int hashmap_remove_and_replace(Hashmap *h, const void *old_key, const void *new_key, void *value) { in hashmap_remove_and_replace()
1509 void *hashmap_remove_value(Hashmap *h, const void *key, void *value) { in hashmap_remove_value()
1530 static unsigned find_first_entry(HashmapBase *h) { in find_first_entry()
1539 void *internal_hashmap_first(HashmapBase *h) { in internal_hashmap_first()
1549 void *internal_hashmap_first_key(HashmapBase *h) { in internal_hashmap_first_key()
1561 void *internal_hashmap_steal_first(HashmapBase *h) { in internal_hashmap_steal_first()
1577 void *internal_hashmap_steal_first_key(HashmapBase *h) { in internal_hashmap_steal_first_key()
1593 unsigned internal_hashmap_size(HashmapBase *h) { in internal_hashmap_size()
1601 unsigned internal_hashmap_buckets(HashmapBase *h) { in internal_hashmap_buckets()
1609 int internal_hashmap_merge(Hashmap *h, Hashmap *other) { in internal_hashmap_merge()
1645 int internal_hashmap_reserve(HashmapBase *h, unsigned entries_add) { in internal_hashmap_reserve()
1663 int internal_hashmap_move(HashmapBase *h, HashmapBase *other) { in internal_hashmap_move()
1708 int internal_hashmap_move_one(HashmapBase *h, HashmapBase *other, const void *key) { in internal_hashmap_move_one()
1745 HashmapBase *internal_hashmap_copy(HashmapBase *h) { in internal_hashmap_copy()
1775 char **internal_hashmap_get_strv(HashmapBase *h) { in internal_hashmap_get_strv()
1792 void *ordered_hashmap_next(OrderedHashmap *h, const void *key) { in ordered_hashmap_next()