X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=tests%2Ftest_urcu_qsbr_gc.c;h=11668ee017e97f325ea9a9243e02d90aefbe24c7;hb=98fbc848f22e74b85d3c98bcf626ba7fd906a6e1;hp=561a475d30c178c907ec5a9402060b9b8db685a2;hpb=bd252a04bbbb163aa4d8864b1e1e5a3a4d9d0892;p=urcu.git diff --git a/tests/test_urcu_qsbr_gc.c b/tests/test_urcu_qsbr_gc.c index 561a475..11668ee 100644 --- a/tests/test_urcu_qsbr_gc.c +++ b/tests/test_urcu_qsbr_gc.c @@ -89,9 +89,9 @@ static struct reclaim_queue *pending_reclaims; /* write-side C.S. duration, in loops */ static unsigned long wduration; -static inline void loop_sleep(unsigned long l) +static inline void loop_sleep(unsigned long loops) { - while(l-- != 0) + while (loops-- != 0) caa_cpu_relax(); } @@ -117,9 +117,10 @@ typedef unsigned long cpu_set_t; static void set_affinity(void) { +#if HAVE_SCHED_SETAFFINITY cpu_set_t mask; - int cpu; - int ret; + int cpu, ret; +#endif /* HAVE_SCHED_SETAFFINITY */ if (!use_affinity) return; @@ -212,7 +213,7 @@ void *thr_reader(void *_count) for (;;) { _rcu_read_lock(); local_ptr = _rcu_dereference(test_rcu_pointer); - debug_yield_read(); + rcu_debug_yield_read(); if (local_ptr) assert(local_ptr->a == 8); if (caa_unlikely(rduration)) @@ -360,10 +361,10 @@ int main(int argc, char **argv) switch (argv[i][1]) { #ifdef DEBUG_YIELD case 'r': - yield_active |= YIELD_READ; + rcu_yield_active |= RCU_YIELD_READ; break; case 'w': - yield_active |= YIELD_WRITE; + rcu_yield_active |= RCU_YIELD_WRITE; break; #endif case 'a':