Unlikely for tests
[urcu.git] / test_perthreadlock.c
index 7b6a65c8c6fb18a68531e13c19587e44aad6729c..3684975eebf7c85312cd3a6a2322f88af03c022c 100644 (file)
@@ -134,7 +134,7 @@ void *thr_reader(void *data)
                assert(test_array.a == 8);
                pthread_mutex_unlock(&per_thread_lock[tidx].lock);
                nr_reads++;
-               if (!test_duration_read())
+               if (unlikely(!test_duration_read()))
                        break;
        }
 
@@ -168,9 +168,9 @@ void *thr_writer(void *data)
                        pthread_mutex_unlock(&per_thread_lock[tidx].lock);
                }
                nr_writes++;
-               if (!test_duration_write())
+               if (unlikely(!test_duration_write()))
                        break;
-               if (wdelay)
+               if (unlikely(wdelay))
                        usleep(wdelay);
        }
 
This page took 0.022545 seconds and 4 git commands to generate.