Fix: volatile in assert()
[urcu.git] / tests / benchmark / test_rwlock.c
index 6f52e5fc7ef65e2d11376230bbd78604ccb35af8..3fad9cf273bb6300143d2b6e147667aa1752accc 100644 (file)
@@ -175,8 +175,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.022835 seconds and 4 git commands to generate.