From: Laurent MAZET Date: Mon, 20 Oct 2025 14:55:40 +0000 (+0200) Subject: improvement X-Git-Url: https://secure.softndesign.org/git/?a=commitdiff_plain;h=d931f607c08935b0142b94a104f20dd78861a08f;p=benchmarks.git improvement --- diff --git a/mq_lat.c b/mq_lat.c index a89fbf4..45ae801 100644 --- a/mq_lat.c +++ b/mq_lat.c @@ -61,6 +61,8 @@ void *ping (__attribute__((unused)) void *arg) pthread_mutex_lock (&mutex); pthread_mutex_unlock (&mutex); + usleep (TIMER / 2); + sys_timestamp (&ts1); if (mq_send (mq_out, msg, MSGLEN, 0) == -1) { fprintf (stderr, "ping error: mq_send (%d)\n", i); diff --git a/pipe_lat.c b/pipe_lat.c index 37030bd..04e2b11 100644 --- a/pipe_lat.c +++ b/pipe_lat.c @@ -52,6 +52,8 @@ void *ping (__attribute__((unused)) void *arg) pthread_mutex_lock (&mutex); pthread_mutex_unlock (&mutex); + usleep (TIMER / 2); + sys_timestamp (&ts1); if (write (fdout, msg, MSGLEN) == -1) { fprintf (stderr, "ping error: write (%d)\n", i); diff --git a/semaphore.c b/semaphore.c index 7552ee2..fb3ba16 100644 --- a/semaphore.c +++ b/semaphore.c @@ -46,6 +46,8 @@ void *ping (__attribute__((unused)) void *arg) pthread_mutex_lock (&mutex); pthread_mutex_unlock (&mutex); + usleep (TIMER / 2); + sys_timestamp (&ts1); sem_post (&sem); diff --git a/udp_lat.c b/udp_lat.c index 5762a5d..05d397b 100644 --- a/udp_lat.c +++ b/udp_lat.c @@ -96,6 +96,8 @@ void *ping (__attribute__((unused)) void *arg) pthread_mutex_lock (&mutex); pthread_mutex_unlock (&mutex); + usleep (TIMER / 2); + sys_timestamp (&ts1); if (sendto (sock, msg, MSGLEN, 0, (struct sockaddr *)&remote, sizeof (remote)) == -1) { fprintf (stderr, "ping error: sendto (%d)\n", i);