From d98a47c754f867bee113325ff69419f0829de0bb Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 15 Jul 2013 20:56:51 -0400 Subject: [PATCH] document metadata_switch_timer() locking constraints Reviewed-by: Julien Desfossez Signed-off-by: Mathieu Desnoyers --- src/common/consumer-timer.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common/consumer-timer.c b/src/common/consumer-timer.c index f9c41c0eb..f2dff4cd9 100644 --- a/src/common/consumer-timer.c +++ b/src/common/consumer-timer.c @@ -56,6 +56,10 @@ static void setmask(sigset_t *mask) /* * Execute action on a timer switch. + * + * Beware: metadata_switch_timer() should *never* take a mutex also held + * while consumer_timer_switch_stop() is called. It would result in + * deadlocks. */ static void metadata_switch_timer(struct lttng_consumer_local_data *ctx, int sig, siginfo_t *si, void *uc) -- 2.34.1