Tests: Add tap-driver.sh for automake < 1.12
[urcu.git] / tests / benchmark / test_mutex.c
index 574d0e8cfce8efb3363c32c8acdae103113b27df..049913c8d8fd62bc11fadffd290805cd2d853384 100644 (file)
@@ -20,8 +20,6 @@
  * 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>
@@ -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);
This page took 0.023349 seconds and 4 git commands to generate.