/* Should the ust comm thread quit ? */
static int lttng_ust_comm_should_quit;
+/*
+ * This variable can be tested by applications to check whether
+ * lttng-ust is loaded. They simply have to define their own
+ * "lttng_ust_loaded" weak symbol, and test it. It is set to 1 by the
+ * library constructor.
+ */
+int lttng_ust_loaded __attribute__((weak));
+
/*
* Return 0 on success, -1 if should quit.
* The lock is taken in both cases.
lttng_fixup_procname_tls();
lttng_fixup_ust_mutex_nest_tls();
+ lttng_ust_loaded = 1;
+
/*
* We want precise control over the order in which we construct
* our sub-libraries vs starting to receive commands from