X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=urcu%2Frculfhash.h;h=9b961044c17330be4d310927b4b44dfb02d0369f;hb=5afadd129c36f4778bcc12c8def6f4e3f9604c7b;hp=1376b5a0b4e2b4fb0fe70378f9bc91644a845027;hpb=276c2fc88c222b5a7c534d21a271564c0bb57935;p=urcu.git diff --git a/urcu/rculfhash.h b/urcu/rculfhash.h index 1376b5a..9b96104 100644 --- a/urcu/rculfhash.h +++ b/urcu/rculfhash.h @@ -94,6 +94,7 @@ void cds_lfht_node_init(struct cds_lfht_node *node, void *key, */ enum { CDS_LFHT_AUTO_RESIZE = (1U << 0), + CDS_LFHT_ACCOUNTING = (1U << 1), }; /* @@ -103,6 +104,7 @@ struct cds_lfht *_cds_lfht_new(cds_lfht_hash_fct hash_fct, cds_lfht_compare_fct compare_fct, unsigned long hash_seed, unsigned long init_size, + unsigned long min_alloc_size, int flags, void (*cds_lfht_call_rcu)(struct rcu_head *head, void (*func)(struct rcu_head *head)), @@ -121,6 +123,7 @@ struct cds_lfht *_cds_lfht_new(cds_lfht_hash_fct hash_fct, * @compare_fct: the key comparison function. * @hash_seed: the seed for hash function. * @init_size: number of nodes to allocate initially. Must be power of two. + * @min_alloc_size: the smallest allocation size to use. Must be power of two. * @flags: hash table creation flags (can be combined with bitwise or: '|'). * 0: no flags. * CDS_LFHT_AUTO_RESIZE: automatically resize hash table. @@ -143,11 +146,12 @@ struct cds_lfht *cds_lfht_new(cds_lfht_hash_fct hash_fct, cds_lfht_compare_fct compare_fct, unsigned long hash_seed, unsigned long init_size, + unsigned long min_alloc_size, int flags, pthread_attr_t *attr) { return _cds_lfht_new(hash_fct, compare_fct, hash_seed, - init_size, flags, + init_size, min_alloc_size, flags, call_rcu, synchronize_rcu, rcu_read_lock, rcu_read_unlock, rcu_thread_offline, rcu_thread_online, rcu_register_thread,