From: Mathieu Desnoyers Date: Tue, 16 Jul 2013 00:56:51 +0000 (-0400) Subject: document metadata_switch_timer() locking constraints X-Git-Tag: v2.2.2~11 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=2755a3c6e93020721bd7c5d82bbb367e3fae9fe4;p=lttng-tools.git document metadata_switch_timer() locking constraints Reviewed-by: Julien Desfossez Signed-off-by: Mathieu Desnoyers --- 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)