X-Git-Url: http://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=test_urcu.c;h=58612815f3c2bbd4882593edf549f935f152593e;hp=d300610e049dc907147228e40d1c2b34245942b4;hb=59d5a40624428364374c306409979155beddfaac;hpb=49a26f58526c3ff15e34087f932298a543c25269 diff --git a/test_urcu.c b/test_urcu.c index d300610..5861281 100644 --- a/test_urcu.c +++ b/test_urcu.c @@ -168,7 +168,7 @@ void *thr_reader(void *_count) assert(local_ptr->a == 8); rcu_read_unlock(); nr_reads++; - if (!test_duration_read()) + if (unlikely(!test_duration_read())) break; } @@ -208,9 +208,9 @@ void *thr_writer(void *_count) old->a = 0; test_array_free(old); nr_writes++; - if (!test_duration_write()) + if (unlikely(!test_duration_write())) break; - if (wdelay) + if (unlikely(wdelay)) usleep(wdelay); }