X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=tests%2Fbenchmark%2Ftest_rwlock_timing.c;h=99c957c148c3b92629505a998bcb270aeef6aaa3;hb=014775106c60f02818ca755b331f887030bd440f;hp=0cc5253b7085c3426704ad9d5a2656d46bc51c9c;hpb=83e334d03eaba62df373cf44298616458900078a;p=urcu.git diff --git a/tests/benchmark/test_rwlock_timing.c b/tests/benchmark/test_rwlock_timing.c index 0cc5253..99c957c 100644 --- a/tests/benchmark/test_rwlock_timing.c +++ b/tests/benchmark/test_rwlock_timing.c @@ -28,11 +28,11 @@ #include #include #include -#include #include #include #include +#include #include "thread-id.h" @@ -67,6 +67,7 @@ static int num_write; static caa_cycles_t __attribute__((aligned(CAA_CACHE_LINE_SIZE))) *reader_time; static caa_cycles_t __attribute__((aligned(CAA_CACHE_LINE_SIZE))) *writer_time; +static void *thr_reader(void *arg) { unsigned int i, j; @@ -86,7 +87,7 @@ void *thr_reader(void *arg) abort(); } - assert(test_array.a == 8); + urcu_posix_assert(test_array.a == 8); ret = pthread_rwlock_unlock(&lock); if (ret) { @@ -106,6 +107,7 @@ void *thr_reader(void *arg) } +static void *thr_writer(void *arg) { unsigned int i, j;