projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix: test: side-effect in assertion
[urcu.git]
/
tests
/
benchmark
/
test_perthreadlock.c
diff --git
a/tests/benchmark/test_perthreadlock.c
b/tests/benchmark/test_perthreadlock.c
index cc5f47dfa7345f530572e11e9b077154cbeed3ad..b10c9cd9a15def438f04b0177388689c6f9b4fd9 100644
(file)
--- a/
tests/benchmark/test_perthreadlock.c
+++ b/
tests/benchmark/test_perthreadlock.c
@@
-183,8
+183,11
@@
void *thr_reader(void *data)
}
for (;;) {
+ int v;
+
pthread_mutex_lock(&per_thread_lock[tidx].lock);
- assert(test_array.a == 8);
+ v = test_array.a;
+ assert(v == 8);
if (caa_unlikely(rduration))
loop_sleep(rduration);
pthread_mutex_unlock(&per_thread_lock[tidx].lock);
This page took
0.023638 seconds
and
4
git commands to generate.