projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rculfhash tests: add uniqueness test
[urcu.git]
/
tests
/
test_mutex.c
diff --git
a/tests/test_mutex.c
b/tests/test_mutex.c
index 1194b0298a68bffd75bb382bbe5c601d123da7ec..3f84bbfa06fa6c280a0896e4072bdf9ce41b4a6f 100644
(file)
--- a/
tests/test_mutex.c
+++ b/
tests/test_mutex.c
@@
-205,11
+205,11
@@
void *thr_reader(void *data)
for (;;) {
pthread_mutex_lock(&lock);
assert(test_array.a == 8);
for (;;) {
pthread_mutex_lock(&lock);
assert(test_array.a == 8);
- if (unlikely(rduration))
+ if (
caa_
unlikely(rduration))
loop_sleep(rduration);
pthread_mutex_unlock(&lock);
nr_reads++;
loop_sleep(rduration);
pthread_mutex_unlock(&lock);
nr_reads++;
- if (unlikely(!test_duration_read()))
+ if (
caa_
unlikely(!test_duration_read()))
break;
}
break;
}
@@
-238,13
+238,13
@@
void *thr_writer(void *data)
pthread_mutex_lock(&lock);
test_array.a = 0;
test_array.a = 8;
pthread_mutex_lock(&lock);
test_array.a = 0;
test_array.a = 8;
- if (unlikely(wduration))
+ if (
caa_
unlikely(wduration))
loop_sleep(wduration);
pthread_mutex_unlock(&lock);
nr_writes++;
loop_sleep(wduration);
pthread_mutex_unlock(&lock);
nr_writes++;
- if (unlikely(!test_duration_write()))
+ if (
caa_
unlikely(!test_duration_write()))
break;
break;
- if (unlikely(wdelay))
+ if (
caa_
unlikely(wdelay))
loop_sleep(wdelay);
}
loop_sleep(wdelay);
}
This page took
0.031829 seconds
and
4
git commands to generate.