X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=tests%2Ftest_mutex.c;h=43d0dace7169d7d8e30ea502400cb2072d1721eb;hb=98fbc848f22e74b85d3c98bcf626ba7fd906a6e1;hp=ba184a47e241ee2fd0cedb6eca326d805bcd3fac;hpb=bd252a04bbbb163aa4d8864b1e1e5a3a4d9d0892;p=urcu.git diff --git a/tests/test_mutex.c b/tests/test_mutex.c index ba184a4..43d0dac 100644 --- a/tests/test_mutex.c +++ b/tests/test_mutex.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;