projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleanup: Re-organise source dir
[urcu.git]
/
tests
/
benchmark
/
test_rwlock.c
diff --git
a/tests/benchmark/test_rwlock.c
b/tests/benchmark/test_rwlock.c
index 6f52e5fc7ef65e2d11376230bbd78604ccb35af8..444859770fbc1127c1b73afa88084d8a4fee103e 100644
(file)
--- a/
tests/benchmark/test_rwlock.c
+++ b/
tests/benchmark/test_rwlock.c
@@
-20,8
+20,6
@@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#define _GNU_SOURCE
-#include "config.h"
#include <stdio.h>
#include <pthread.h>
#include <stdlib.h>
#include <stdio.h>
#include <pthread.h>
#include <stdlib.h>
@@
-175,8
+173,11
@@
void *thr_reader(void *_count)
}
for (;;) {
}
for (;;) {
+ int a;
+
pthread_rwlock_rdlock(&lock);
pthread_rwlock_rdlock(&lock);
- assert(test_array.a == 8);
+ a = test_array.a;
+ assert(a == 8);
if (caa_unlikely(rduration))
loop_sleep(rduration);
pthread_rwlock_unlock(&lock);
if (caa_unlikely(rduration))
loop_sleep(rduration);
pthread_rwlock_unlock(&lock);
This page took
0.023706 seconds
and
4
git commands to generate.