From cb2337522f4a0a7f3200daff65c537482c67b434 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Wed, 6 Jul 2011 15:00:14 -0400 Subject: [PATCH] rculfhash: Remove "value" pointer Use container_of instead. Signed-off-by: Mathieu Desnoyers --- tests/test_urcu_hash.c | 3 +-- urcu/rculfhash.h | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) 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; } -- 2.34.1