Unlikely for tests
[urcu.git] / test_rwlock.c
index ef3ce2c73bb49c14571703c9d9d6eb94e5ba164a..1c29d73839adaec693c53a2315c8e0cd8a2a1be0 100644 (file)
@@ -127,7 +127,7 @@ void *thr_reader(void *_count)
                assert(test_array.a == 8);
                pthread_rwlock_unlock(&lock);
                nr_reads++;
-               if (!test_duration_read())
+               if (unlikely(!test_duration_read()))
                        break;
        }
 
@@ -156,9 +156,9 @@ void *thr_writer(void *_count)
                test_array.a = 8;
                pthread_rwlock_unlock(&lock);
                nr_writes++;
-               if (!test_duration_write())
+               if (unlikely(!test_duration_write()))
                        break;
-               if (wdelay)
+               if (unlikely(wdelay))
                        usleep(wdelay);
        }
 
This page took 0.023194 seconds and 4 git commands to generate.