projects
/
userspace-rcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove glibc < 2.4 compat code for sched_setaffinity
[userspace-rcu.git]
/
tests
/
benchmark
/
test_perthreadlock.c
diff --git
a/tests/benchmark/test_perthreadlock.c
b/tests/benchmark/test_perthreadlock.c
index 512b1fc8ff1dc1f6697c28911ce382cec3c1ebe3..6e079274448a899a686ce24b6e64de4b4a2767c4 100644
(file)
--- a/
tests/benchmark/test_perthreadlock.c
+++ b/
tests/benchmark/test_perthreadlock.c
@@
-33,7
+33,6
@@
#include <urcu/arch.h>
#include <urcu/tls-compat.h>
#include <urcu/arch.h>
#include <urcu/tls-compat.h>
-#include "cpuset.h"
#include "thread-id.h"
/* hardcoded number of CPUs */
#include "thread-id.h"
/* hardcoded number of CPUs */
@@
-114,11
+113,7
@@
static void set_affinity(void)
}
CPU_ZERO(&mask);
CPU_SET(cpu, &mask);
}
CPU_ZERO(&mask);
CPU_SET(cpu, &mask);
-#if SCHED_SETAFFINITY_ARGS == 2
- sched_setaffinity(0, &mask);
-#else
sched_setaffinity(0, sizeof(mask), &mask);
sched_setaffinity(0, sizeof(mask), &mask);
-#endif
#endif /* HAVE_SCHED_SETAFFINITY */
}
#endif /* HAVE_SCHED_SETAFFINITY */
}
@@
-220,7
+215,7
@@
void *thr_writer(void *data)
cmm_smp_mb();
for (;;) {
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;
urcu_mutex_lock(&per_thread_lock[tidx].lock);
}
test_array.a = 0;
This page took
0.023175 seconds
and
4
git commands to generate.