Fix phase5 test log collection
[urcu.git] / test_qsbr_gc.c
index f38477ebf4281c4582d2433c21af3eff4f89f4f0..3a66a845f3636071d9cad298ef1c1f351982bbb6 100644 (file)
@@ -250,7 +250,11 @@ static void rcu_gc_reclaim(unsigned long wtidx, void *old)
 void *thr_writer(void *data)
 {
        unsigned long wtidx = (unsigned long)data;
+#ifdef TEST_LOCAL_GC
+       struct test_array *old = NULL;
+#else
        struct test_array *new, *old;
+#endif
 
        printf_verbose("thread_begin %s, thread id : %lx, tid %lu\n",
                        "writer", pthread_self(), (unsigned long)gettid());
@@ -263,9 +267,11 @@ void *thr_writer(void *data)
        smp_mb();
 
        for (;;) {
+#ifndef TEST_LOCAL_GC
                new = malloc(sizeof(*new));
                new->a = 8;
                old = _rcu_xchg_pointer(&test_rcu_pointer, new);
+#endif
                rcu_gc_reclaim(wtidx, old);
                nr_writes++;
                if (unlikely(!test_duration_write()))
This page took 0.022491 seconds and 4 git commands to generate.