2 * Copyright (C) 2020 Michael Jeanson <mjeanson@efficios.com>
4 * SPDX-License-Identifier: LGPL-2.1-only
10 #include <common/compat/pthread.hpp>
14 int lttng_thread_setname(const char *name
)
17 char pthread_name
[LTTNG_PTHREAD_NAMELEN
];
20 * Truncations are expected since pthread limits thread names to
21 * a generous 16 characters.
23 strncpy(pthread_name
, name
, sizeof(pthread_name
));
24 pthread_name
[sizeof(pthread_name
) - 1] = '\0';
26 ret
= lttng_pthread_setname_np(pthread_name
);
This page took 0.029212 seconds and 4 git commands to generate.