Remove glibc < 2.4 compat code for sched_setaffinity
[urcu.git] / tests / benchmark / test_perthreadlock.c
index 512b1fc8ff1dc1f6697c28911ce382cec3c1ebe3..6e079274448a899a686ce24b6e64de4b4a2767c4 100644 (file)
@@ -33,7 +33,6 @@
 
 #include <urcu/arch.h>
 #include <urcu/tls-compat.h>
-#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;
This page took 0.022874 seconds and 4 git commands to generate.