rculfhash: Remove "value" pointer
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 6 Jul 2011 19:00:14 +0000 (15:00 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 6 Jul 2011 19:00:14 +0000 (15:00 -0400)
Use container_of instead.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
tests/test_urcu_hash.c
urcu/rculfhash.h

index 92816674dc97a99bc4c96f4b7cf6268706eea569..9bb7da721232626e44e2dfeed2d51a12bff6d892 100644 (file)
@@ -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) {
index ed75431f9864e08b9668e29b86f10496f8110253..d671af3e35ecc9b0e57a7955902ac230e244c987 100644 (file)
@@ -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;
 }
 
This page took 0.030042 seconds and 4 git commands to generate.