Cleanup: Re-organise source dir
[urcu.git] / tests / benchmark / test_rwlock.c
index 6f52e5fc7ef65e2d11376230bbd78604ccb35af8..444859770fbc1127c1b73afa88084d8a4fee103e 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>
@@ -175,8 +173,11 @@ void *thr_reader(void *_count)
        }
 
        for (;;) {
+               int a;
+
                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);
This page took 0.024466 seconds and 4 git commands to generate.