X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=tests%2Fbenchmark%2Ftest_perthreadlock.c;h=6e079274448a899a686ce24b6e64de4b4a2767c4;hb=0614a2e61ccbf150cc51d4fd3073b285983417c5;hp=512b1fc8ff1dc1f6697c28911ce382cec3c1ebe3;hpb=83e334d03eaba62df373cf44298616458900078a;p=userspace-rcu.git diff --git a/tests/benchmark/test_perthreadlock.c b/tests/benchmark/test_perthreadlock.c index 512b1fc..6e07927 100644 --- a/tests/benchmark/test_perthreadlock.c +++ b/tests/benchmark/test_perthreadlock.c @@ -33,7 +33,6 @@ #include #include -#include "cpuset.h" #include "thread-id.h" /* hardcoded number of CPUs */ @@ -114,11 +113,7 @@ static void set_affinity(void) } CPU_ZERO(&mask); CPU_SET(cpu, &mask); -#if SCHED_SETAFFINITY_ARGS == 2 - sched_setaffinity(0, &mask); -#else sched_setaffinity(0, sizeof(mask), &mask); -#endif #endif /* HAVE_SCHED_SETAFFINITY */ } @@ -220,7 +215,7 @@ void *thr_writer(void *data) cmm_smp_mb(); for (;;) { - for (tidx = 0; tidx < nr_readers; tidx++) { + for (tidx = 0; tidx < (long)nr_readers; tidx++) { urcu_mutex_lock(&per_thread_lock[tidx].lock); } test_array.a = 0;