From 7b766b16cc94fd3ade981b8ada8c912a01ff98c1 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Tue, 23 Aug 2011 20:19:03 -0400 Subject: [PATCH] UST_REGISTER_TIMEOUT 0 and 1 change (follow poll() timeout) 0 now means "don't wait" and -1 "wait forever". Signed-off-by: Mathieu Desnoyers --- README | 4 ++-- libust/lttng-ust-comm.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README b/README index 399263d5..635f9c1b 100644 --- a/README +++ b/README @@ -55,8 +55,8 @@ ENVIRONMENT VARIABLES: specify how long the applications should wait for sessiond "registration done" command before proceeding to execute the main program. The default is 3000ms (3 seconds). The timeout value is - specified in milliseconds. The value -1 means "don't wait". The value - 0 means "wait forever". + specified in milliseconds. The value 0 means "don't wait". The value + -1 means "wait forever". TRACE VIEWER: diff --git a/libust/lttng-ust-comm.c b/libust/lttng-ust-comm.c index 8f0cb85b..1496408f 100644 --- a/libust/lttng-ust-comm.c +++ b/libust/lttng-ust-comm.c @@ -424,11 +424,11 @@ void __attribute__((constructor)) lttng_ust_comm_init(void) assert(!ret); } break; - case 0: /* wait forever */ + case -1:/* wait forever */ ret = sem_wait(&constructor_wait); assert(!ret); break; - case -1:/* no timeout */ + case 0: /* no timeout */ break; } pthread_mutex_unlock(<tng_ust_comm_mutex); -- 2.34.1