Remote mutex from RCU write-side
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Mon, 22 Jun 2009 14:50:53 +0000 (10:50 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Mon, 22 Jun 2009 14:50:53 +0000 (10:50 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
test_qsbr.c
test_qsbr_gc.c
test_urcu.c
test_urcu_gc.c

index 2617629743e15a80b77da08b33de7cc7206e25f0..97b918d2dde75b962e9533e6fbbf8fe0d371c69c 100644 (file)
@@ -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;
index 98094a6c80da23c90d738d9f11d8e29fa6e278bf..f38477ebf4281c4582d2433c21af3eff4f89f4f0 100644 (file)
@@ -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()))
index 96dac983336bfa87a57fc861a6b780c843378fba..3feda89e49a45f2edff66a7bbab5fbab6c7d27f7 100644 (file)
@@ -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);
index 66b714ba072f786e1bc519382543e036f03df50a..6d7d8ca53a10088283d5c0843ab3c0b22bff203c 100644 (file)
@@ -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()))
This page took 0.043325 seconds and 4 git commands to generate.