From 4aa7451e29e7fc23cfbf7ba77c95041de9647872 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 22 Jun 2009 10:50:53 -0400 Subject: [PATCH] Remote mutex from RCU write-side Signed-off-by: Mathieu Desnoyers --- test_qsbr.c | 5 ----- test_qsbr_gc.c | 5 ----- test_urcu.c | 6 ------ test_urcu_gc.c | 5 ----- 4 files changed, 21 deletions(-) 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())) -- 2.34.1