X-Git-Url: https://git.lttng.org/?p=urcu.git;a=blobdiff_plain;f=test_rwlock.c;h=ef3ce2c73bb49c14571703c9d9d6eb94e5ba164a;hp=76156cb01064e335b729be9458f0fdd9a0720c16;hb=2b4e41252ca7ad279d2aa91f2a011b36aa56b224;hpb=78efb485e9baa0408e8d96932a68784bc19e59a5 diff --git a/test_rwlock.c b/test_rwlock.c index 76156cb..ef3ce2c 100644 --- a/test_rwlock.c +++ b/test_rwlock.c @@ -65,7 +65,7 @@ static volatile int test_go, test_stop; static int wdelay; -static struct test_array test_array = { 8 }; +static volatile struct test_array test_array = { 8 }; static unsigned long duration; @@ -152,6 +152,7 @@ void *thr_writer(void *_count) for (;;) { pthread_rwlock_wrlock(&lock); + test_array.a = 0; test_array.a = 8; pthread_rwlock_unlock(&lock); nr_writes++;