Add common util to set thread name
[lttng-tools.git] / src / common / thread.h
diff --git a/src/common/thread.h b/src/common/thread.h
new file mode 100644 (file)
index 0000000..b731722
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2020 Michael Jeanson <mjeanson@efficios.com>
+ *
+ * SPDX-License-Identifier: LGPL-2.1-only
+ *
+ */
+
+#ifndef LTTNG_THREAD_H
+#define LTTNG_THREAD_H
+
+#include <common/macros.h>
+
+/*
+ * Set the current thread name on platforms that support it. The name can
+ * be of arbitrary length and will be truncated to the platform limit,
+ * usually 16.
+ */
+LTTNG_HIDDEN
+int lttng_thread_setname(const char *name);
+
+#endif /* LTTNG_THREAD_H */
This page took 0.023044 seconds and 4 git commands to generate.