From: David Goulet Date: Wed, 5 Feb 2014 22:40:59 +0000 (-0500) Subject: Fix: don't sleep(1) on the consumer ready flag X-Git-Tag: v2.5.0-rc1~200 X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;h=1f3130d5f91951f84ccb985ca66c2c6cb6816984;hp=ca741d243ae877c1acfaaadafbf4e7d98cea7c48;p=lttng-tools.git Fix: don't sleep(1) on the consumer ready flag This is way too long on especially when the first command that spawn the consumer as to wait a full second on powerful system. Bring this down to 0.1 sec sleep by using usleep(). Signed-off-by: David Goulet --- diff --git a/src/bin/lttng-consumerd/lttng-consumerd.c b/src/bin/lttng-consumerd/lttng-consumerd.c index d9ec0f33e..e226ebc69 100644 --- a/src/bin/lttng-consumerd/lttng-consumerd.c +++ b/src/bin/lttng-consumerd/lttng-consumerd.c @@ -426,7 +426,7 @@ int main(int argc, char **argv) * sessiond thread reply to the sessiond that we are ready. */ while (uatomic_read(<tng_consumer_ready)) { - sleep(1); + usleep(100000); } cmm_smp_mb(); /* Read ready before following operations */