projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rculfhash: add min_alloc_size test parameter
[urcu.git]
/
tests
/
test_rwlock.c
diff --git
a/tests/test_rwlock.c
b/tests/test_rwlock.c
index 1c65fca9198247d883525f5d881bcbdb6800b2c9..9c8f97e39cf2232be5f461a655102ba1c3feac07 100644
(file)
--- a/
tests/test_rwlock.c
+++ b/
tests/test_rwlock.c
@@
-31,12
+31,15
@@
#include <unistd.h>
#include <stdio.h>
#include <assert.h>
#include <unistd.h>
#include <stdio.h>
#include <assert.h>
-#include <sys/syscall.h>
#include <sched.h>
#include <errno.h>
#include <urcu/arch.h>
#include <sched.h>
#include <errno.h>
#include <urcu/arch.h>
+#ifdef __linux__
+#include <syscall.h>
+#endif
+
/* hardcoded number of CPUs */
#define NR_CPUS 16384
/* hardcoded number of CPUs */
#define NR_CPUS 16384
@@
-85,7
+88,7
@@
static unsigned long wduration;
static inline void loop_sleep(unsigned long l)
{
while(l-- != 0)
static inline void loop_sleep(unsigned long l)
{
while(l-- != 0)
- cpu_relax();
+ c
aa_c
pu_relax();
}
static int verbose_mode;
}
static int verbose_mode;
@@
-225,7
+228,7
@@
void *thr_writer(void *_count)
while (!test_go)
{
}
while (!test_go)
{
}
- smp_mb();
+
cmm_
smp_mb();
for (;;) {
pthread_rwlock_wrlock(&lock);
for (;;) {
pthread_rwlock_wrlock(&lock);
@@
-274,7
+277,7
@@
int main(int argc, char **argv)
show_usage(argc, argv);
return -1;
}
show_usage(argc, argv);
return -1;
}
- smp_mb();
+
cmm_
smp_mb();
err = sscanf(argv[1], "%u", &nr_readers);
if (err != 1) {
err = sscanf(argv[1], "%u", &nr_readers);
if (err != 1) {
@@
-370,7
+373,7
@@
int main(int argc, char **argv)
exit(1);
}
exit(1);
}
- smp_mb();
+
cmm_
smp_mb();
test_go = 1;
test_go = 1;
This page took
0.02442 seconds
and
4
git commands to generate.