X-Git-Url: https://git.lttng.org/?p=urcu.git;a=blobdiff_plain;f=tests%2Ftest_rwlock.c;h=45dad7869427fc434a021f5bddc60f3f7590ea06;hp=ccbc9d170c9e226dab54944881095f8c1599b39d;hb=95bc7fb90c36ee10dc171a23e8783eff30072b7b;hpb=bd252a04bbbb163aa4d8864b1e1e5a3a4d9d0892 diff --git a/tests/test_rwlock.c b/tests/test_rwlock.c index ccbc9d1..45dad78 100644 --- a/tests/test_rwlock.c +++ b/tests/test_rwlock.c @@ -86,9 +86,9 @@ static unsigned long rduration; /* 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(); } @@ -114,9 +114,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;