From: Mathieu Desnoyers Date: Wed, 6 Jul 2011 19:00:14 +0000 (-0400) Subject: rculfhash: Remove "value" pointer X-Git-Tag: v0.7.0~43^2~221 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=cb2337522f4a0a7f3200daff65c537482c67b434;p=urcu.git rculfhash: Remove "value" pointer Use container_of instead. Signed-off-by: Mathieu Desnoyers --- diff --git a/tests/test_urcu_hash.c b/tests/test_urcu_hash.c index 9281667..9bb7da7 100644 --- a/tests/test_urcu_hash.c +++ b/tests/test_urcu_hash.c @@ -403,8 +403,7 @@ void *thr_writer(void *_count) rcu_read_lock(); ht_node_init(node, (void *)(unsigned long)(rand_r(&rand_lookup) % RAND_POOL), - sizeof(void *), - (void *) 0x42); + sizeof(void *)); ret = ht_add_unique(test_ht, node); rcu_read_unlock(); if (ret) { diff --git a/urcu/rculfhash.h b/urcu/rculfhash.h index ed75431..d671af3 100644 --- a/urcu/rculfhash.h +++ b/urcu/rculfhash.h @@ -11,7 +11,6 @@ struct rcu_ht_node { unsigned long hash; unsigned long reverse_hash; unsigned int dummy; - void *value; struct rcu_head head; }; @@ -29,11 +28,10 @@ typedef unsigned long (*ht_compare_fct)(void *key1, size_t key1_len, static inline void ht_node_init(struct rcu_ht_node *node, void *key, - size_t key_len, void *value) + size_t key_len) { node->key = key; node->key_len = key_len; - node->value = value; node->dummy = 0; }