From 19b8479e24d9902fc97f053b3b064e552d08c2a5 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Wed, 24 Aug 2016 16:16:08 -0400 Subject: [PATCH] Add get flavor to rculfhash Signed-off-by: Mathieu Desnoyers --- include/urcu/rculfhash.h | 5 +++++ src/rculfhash.c | 5 +++++ 2 files changed, 10 insertions(+) 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; +} -- 2.34.1