X-Git-Url: http://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=test_qsbr.c;h=82521efcf83a9babbf743f7741ad05a473efabb6;hp=ff55f8b8515f62185d1241056a1cfc8668bce010;hb=59d5a40624428364374c306409979155beddfaac;hpb=49a26f58526c3ff15e34087f932298a543c25269 diff --git a/test_qsbr.c b/test_qsbr.c index ff55f8b..82521ef 100644 --- a/test_qsbr.c +++ b/test_qsbr.c @@ -165,9 +165,9 @@ void *thr_reader(void *_count) _rcu_read_unlock(); nr_reads++; /* QS each 1024 reads */ - if ((nr_reads & ((1 << 10) - 1)) == 0) + if (unlikely((nr_reads & ((1 << 10) - 1)) == 0)) _rcu_quiescent_state(); - if (!test_duration_read()) + if (unlikely(!test_duration_read())) break; } @@ -207,9 +207,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); }