From: Laurent MAZET Date: Fri, 17 Oct 2025 16:04:25 +0000 (+0200) Subject: avoid initial aberant value in semaphore test X-Git-Url: https://secure.softndesign.org/git/?a=commitdiff_plain;h=3b1fabd7285430ffa84c9032e7adf5cab75a28b1;p=benchmarks.git avoid initial aberant value in semaphore test --- diff --git a/semaphore.c b/semaphore.c index 223937d..7552ee2 100644 --- a/semaphore.c +++ b/semaphore.c @@ -66,6 +66,9 @@ void *pong (__attribute__((unused)) void *arg) sem_wait (&sem); sys_timestamp (&ts2); deltas[i] = diff_timestamp (&ts2, &ts1); + if ((i == 0) && (deltas[i] > 1e9)) { + i--; + } pthread_mutex_lock (&mutex); usleep (TIMER);