X-Git-Url: https://git.lttng.org/?p=urcu.git;a=blobdiff_plain;f=tests%2Ftest_mutex.c;fp=tests%2Ftest_mutex.c;h=3f84bbfa06fa6c280a0896e4072bdf9ce41b4a6f;hp=1194b0298a68bffd75bb382bbe5c601d123da7ec;hb=a0b7f7ea3fc3339a1c42caffd53ce9f056e5b901;hpb=de10a5858ea0638c9059bb3315794ccb1401f404 diff --git a/tests/test_mutex.c b/tests/test_mutex.c index 1194b02..3f84bbf 100644 --- a/tests/test_mutex.c +++ b/tests/test_mutex.c @@ -205,11 +205,11 @@ void *thr_reader(void *data) for (;;) { pthread_mutex_lock(&lock); assert(test_array.a == 8); - if (unlikely(rduration)) + if (caa_unlikely(rduration)) loop_sleep(rduration); pthread_mutex_unlock(&lock); nr_reads++; - if (unlikely(!test_duration_read())) + if (caa_unlikely(!test_duration_read())) break; } @@ -238,13 +238,13 @@ void *thr_writer(void *data) pthread_mutex_lock(&lock); test_array.a = 0; test_array.a = 8; - if (unlikely(wduration)) + if (caa_unlikely(wduration)) loop_sleep(wduration); pthread_mutex_unlock(&lock); nr_writes++; - if (unlikely(!test_duration_write())) + if (caa_unlikely(!test_duration_write())) break; - if (unlikely(wdelay)) + if (caa_unlikely(wdelay)) loop_sleep(wdelay); }