From: Mathieu Desnoyers Date: Tue, 27 Sep 2011 21:39:30 +0000 (-0400) Subject: rculfhash test: move init node outside of rcu read-side c.s. (unneeded protection) X-Git-Tag: v0.7.0~43^2~118 X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=commitdiff_plain;h=6b262fd76774cdd6c7ec62d2a74515d9a28c2317 rculfhash test: move init node outside of rcu read-side c.s. (unneeded protection) Signed-off-by: Mathieu Desnoyers --- 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 {