New API: lttng_ust_init_thread() for async-signal tracing
[lttng-ust.git] / include / lttng / ust-thread.h
diff --git a/include/lttng/ust-thread.h b/include/lttng/ust-thread.h
new file mode 100644 (file)
index 0000000..2c84ae7
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * SPDX-License-Identifier: MIT
+ *
+ * Copyright (C) 2021 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ */
+
+#ifndef _LTTNG_UST_THREAD_H
+#define _LTTNG_UST_THREAD_H
+
+#include <signal.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Initialize this thread's LTTng-UST data structures. There is
+ * typically no need to call this, because LTTng-UST initializes its
+ * per-thread data structures lazily, but it should be called explicitly
+ * upon creation of each thread before signal handlers nesting over
+ * those threads use LTTng-UST tracepoints.
+ */
+void lttng_ust_init_thread(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _LTTNG_UST_THREAD_H */
This page took 0.023286 seconds and 4 git commands to generate.