common: compile libcommon as C++
[lttng-tools.git] / src / common / thread.c
diff --git a/src/common/thread.c b/src/common/thread.c
deleted file mode 100644 (file)
index 34a6206..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (C) 2020 Michael Jeanson <mjeanson@efficios.com>
- *
- * SPDX-License-Identifier: LGPL-2.1-only
- *
- */
-
-#include <string.h>
-
-#include <common/compat/pthread.h>
-#include "thread.h"
-
-
-int lttng_thread_setname(const char *name)
-{
-       int ret;
-       char pthread_name[LTTNG_PTHREAD_NAMELEN];
-
-       /*
-        * Truncations are expected since pthread limits thread names to
-        * a generous 16 characters.
-        */
-       strncpy(pthread_name, name, sizeof(pthread_name));
-       pthread_name[sizeof(pthread_name) - 1] = '\0';
-
-       ret = lttng_pthread_setname_np(pthread_name);
-
-       return ret;
-}
-
This page took 0.024442 seconds and 4 git commands to generate.