X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=tests%2Ftest_perthreadlock.c;h=47eaff6918faa324009888738c05900c98b86e04;hb=7294103b4caaa3487a362ae9925faa7f6821e0b3;hp=e8e616637d1b06a3783d2f75fe1d9df73d8b17fb;hpb=dee093381aa4f642a707fb4b28dbb9df0b8ad155;p=urcu.git diff --git a/tests/test_perthreadlock.c b/tests/test_perthreadlock.c index e8e6166..47eaff6 100644 --- a/tests/test_perthreadlock.c +++ b/tests/test_perthreadlock.c @@ -90,9 +90,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(); } @@ -118,9 +118,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;