tests: remove rcu_publish_content dependency
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Mon, 5 Oct 2009 19:03:32 +0000 (15:03 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Mon, 5 Oct 2009 19:03:32 +0000 (15:03 -0400)
API phased-out.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
tests/test_qsbr.c
tests/test_qsbr_timing.c
tests/test_urcu.c
tests/test_urcu_bp.c
tests/test_urcu_timing.c

index 6230510ab39688d9ba8524e6aadc9bc721470883..d6c4d1aed017420666da1ad68562542f151b6d80 100644 (file)
@@ -259,7 +259,8 @@ void *thr_writer(void *_count)
        for (;;) {
                new = test_array_alloc();
                new->a = 8;
-               old = rcu_publish_content(&test_rcu_pointer, new);
+               old = rcu_xchg_pointer(&test_rcu_pointer, new);
+               synchronize_rcu();
                /* can be done after unlock */
                if (old)
                        old->a = 0;
index bbe983e8da53efba99733c94deb59466157f72b6..969b802106da801750f39a5e02b1ab05c74c3348 100644 (file)
@@ -153,8 +153,9 @@ void *thr_writer(void *arg)
                                assert(old->a == 8);
                        }
                        new->a = 8;
-                       old = _rcu_publish_content(&test_rcu_pointer, new);
+                       old = rcu_xchg_pointer(&test_rcu_pointer, new);
                        rcu_copy_mutex_unlock();
+                       synchronize_rcu();
                        /* can be done after unlock */
                        if (old) {
                                old->a = 0;
index 3b838c147e2b8ca3ddf866c6218937ac5c8ba2bb..42892165fce3238564580f2407f4f1922f179f5a 100644 (file)
@@ -256,7 +256,8 @@ void *thr_writer(void *_count)
        for (;;) {
                new = test_array_alloc();
                new->a = 8;
-               old = rcu_publish_content(&test_rcu_pointer, new);
+               old = rcu_xchg_pointer(&test_rcu_pointer, new);
+               synchronize_rcu();
                if (old)
                        old->a = 0;
                test_array_free(old);
index 89873324a3580badfdecfe5a1981ef799e13bca0..fca7ac5d75f7ea4167928b3b22d9fa72c71abda3 100644 (file)
@@ -256,7 +256,8 @@ void *thr_writer(void *_count)
        for (;;) {
                new = test_array_alloc();
                new->a = 8;
-               old = rcu_publish_content(&test_rcu_pointer, new);
+               old = rcu_xchg_pointer(&test_rcu_pointer, new);
+               synchronize_rcu();
                if (old)
                        old->a = 0;
                test_array_free(old);
index 13c0993570817560b4e45809db9660bf0f09b074..79cd838f56084cd6aae287619206a42d777eab29 100644 (file)
@@ -152,8 +152,9 @@ void *thr_writer(void *arg)
                                assert(old->a == 8);
                        }
                        new->a = 8;
-                       old = rcu_publish_content(&test_rcu_pointer, new);
+                       old = rcu_xchg_pointer(&test_rcu_pointer, new);
                        rcu_copy_mutex_unlock();
+                       synchronize_rcu();
                        /* can be done after unlock */
                        if (old) {
                                old->a = 0;
This page took 0.027569 seconds and 4 git commands to generate.