From: Mathieu Desnoyers Date: Wed, 24 Aug 2016 20:16:08 +0000 (-0400) Subject: Add get flavor to rculfhash X-Git-Url: http://git.liburcu.org/?p=userspace-rcu.git;a=commitdiff_plain;h=19b8479e24d9902fc97f053b3b064e552d08c2a5 Add get flavor to rculfhash Signed-off-by: Mathieu Desnoyers --- diff --git a/include/urcu/rculfhash.h b/include/urcu/rculfhash.h index 9934422..4b698b7 100644 --- a/include/urcu/rculfhash.h +++ b/include/urcu/rculfhash.h @@ -447,6 +447,11 @@ int cds_lfht_is_node_deleted(struct cds_lfht_node *node); extern void cds_lfht_resize(struct cds_lfht *ht, unsigned long new_size); +/* + * cds_lfht_rcu_flavor: get RCU flavor argument from hash table creation. + */ +const struct rcu_flavor_struct *cds_lfht_rcu_flavor(struct cds_lfht *ht); + /* * Note: it is safe to perform element removal (del), replacement, or * any hash table update operation during any of the following hash diff --git a/src/rculfhash.c b/src/rculfhash.c index d7a1f23..e2cf193 100644 --- a/src/rculfhash.c +++ b/src/rculfhash.c @@ -2045,3 +2045,8 @@ void cds_lfht_resize_lazy_count(struct cds_lfht *ht, unsigned long size, } __cds_lfht_resize_lazy_launch(ht); } + +const struct rcu_flavor_struct *cds_lfht_rcu_flavor(struct cds_lfht *ht) +{ + return ht->flavor; +}