X-Git-Url: http://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=tests%2Fbenchmark%2Ftest_mutex.c;h=049913c8d8fd62bc11fadffd290805cd2d853384;hp=574d0e8cfce8efb3363c32c8acdae103113b27df;hb=4b2d70a71f5d7ac75c9eb2589c3df26a2ed0684a;hpb=2650042a5405028da49bfcfb71053b78a56a9ed4 diff --git a/tests/benchmark/test_mutex.c b/tests/benchmark/test_mutex.c index 574d0e8..049913c 100644 --- a/tests/benchmark/test_mutex.c +++ b/tests/benchmark/test_mutex.c @@ -20,8 +20,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#define _GNU_SOURCE -#include "config.h" #include #include #include @@ -179,8 +177,11 @@ void *thr_reader(void *data) } for (;;) { + int v; + pthread_mutex_lock(&lock); - assert(test_array.a == 8); + v = test_array.a; + assert(v == 8); if (caa_unlikely(rduration)) loop_sleep(rduration); pthread_mutex_unlock(&lock);