From 6b262fd76774cdd6c7ec62d2a74515d9a28c2317 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Tue, 27 Sep 2011 17:39:30 -0400 Subject: [PATCH] rculfhash test: move init node outside of rcu read-side c.s. (unneeded protection) Signed-off-by: Mathieu Desnoyers --- tests/test_urcu_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_urcu_hash.c b/tests/test_urcu_hash.c index c796b6f..d6464b4 100644 --- a/tests/test_urcu_hash.c +++ b/tests/test_urcu_hash.c @@ -515,10 +515,10 @@ void *thr_writer(void *_count) if ((addremove == AR_ADD || add_only) || (addremove == AR_RANDOM && rand_r(&rand_lookup) & 1)) { node = malloc(sizeof(struct cds_lfht_node)); - rcu_read_lock(); cds_lfht_node_init(node, (void *)(((unsigned long) rand_r(&rand_lookup) % write_pool_size) + write_pool_offset), sizeof(void *)); + rcu_read_lock(); if (add_unique) { ret_node = cds_lfht_add_unique(test_ht, node); } else { -- 2.34.1