From: Mathieu Desnoyers Date: Mon, 22 Jun 2009 14:50:53 +0000 (-0400) Subject: Remote mutex from RCU write-side X-Git-Tag: v0.1~119 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=4aa7451e29e7fc23cfbf7ba77c95041de9647872;p=userspace-rcu.git Remote mutex from RCU write-side Signed-off-by: Mathieu Desnoyers --- diff --git a/test_qsbr.c b/test_qsbr.c index 2617629..97b918d 100644 --- a/test_qsbr.c +++ b/test_qsbr.c @@ -257,13 +257,8 @@ void *thr_writer(void *_count) for (;;) { new = test_array_alloc(); - rcu_copy_mutex_lock(); - old = test_rcu_pointer; - if (old) - assert(old->a == 8); new->a = 8; old = _rcu_publish_content(&test_rcu_pointer, new); - rcu_copy_mutex_unlock(); /* can be done after unlock */ if (old) old->a = 0; diff --git a/test_qsbr_gc.c b/test_qsbr_gc.c index 98094a6..f38477e 100644 --- a/test_qsbr_gc.c +++ b/test_qsbr_gc.c @@ -264,13 +264,8 @@ void *thr_writer(void *data) for (;;) { new = malloc(sizeof(*new)); - rcu_copy_mutex_lock(); - old = test_rcu_pointer; - if (old) - assert(old->a == 8); new->a = 8; old = _rcu_xchg_pointer(&test_rcu_pointer, new); - rcu_copy_mutex_unlock(); rcu_gc_reclaim(wtidx, old); nr_writes++; if (unlikely(!test_duration_write())) diff --git a/test_urcu.c b/test_urcu.c index 96dac98..3feda89 100644 --- a/test_urcu.c +++ b/test_urcu.c @@ -258,14 +258,8 @@ void *thr_writer(void *_count) for (;;) { new = test_array_alloc(); - rcu_copy_mutex_lock(); - old = test_rcu_pointer; - if (old) - assert(old->a == 8); new->a = 8; old = rcu_publish_content(&test_rcu_pointer, new); - rcu_copy_mutex_unlock(); - /* can be done after unlock */ if (old) old->a = 0; test_array_free(old); diff --git a/test_urcu_gc.c b/test_urcu_gc.c index 66b714b..6d7d8ca 100644 --- a/test_urcu_gc.c +++ b/test_urcu_gc.c @@ -265,13 +265,8 @@ void *thr_writer(void *data) for (;;) { new = malloc(sizeof(*new)); - rcu_copy_mutex_lock(); - old = test_rcu_pointer; - if (old) - assert(old->a == 8); new->a = 8; old = rcu_xchg_pointer(&test_rcu_pointer, new); - rcu_copy_mutex_unlock(); rcu_gc_reclaim(wtidx, old); nr_writes++; if (unlikely(!test_duration_write()))