diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2020-11-25 16:42:23 +0300 |
---|---|---|
committer | Link Mauve <vlc@linkmauve.fr> | 2021-02-11 20:37:45 +0300 |
commit | b44ec4539046b6220e5dafb4b5f6061a8c4f80a3 (patch) | |
tree | 1a58cabaf4875bcd1625e5813504434d6172060c | |
parent | fe2bb774243bc734f39d94d2519e23c1eabb7b35 (diff) |
Set thread names on Haiku
-rw-r--r-- | src/thread.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/thread.h b/src/thread.h index 6cd304e..e8ca8de 100644 --- a/src/thread.h +++ b/src/thread.h @@ -169,6 +169,14 @@ static inline void dav1d_set_thread_name(const char *const name) { pthread_setname_np(pthread_self(), "%s", (void*)name); } +#elif defined(__HAIKU__) + +#include <os/kernel/OS.h> + +static inline void dav1d_set_thread_name(const char *const name) { + rename_thread(find_thread(NULL), name); +} + #else #define dav1d_set_thread_name(name) do {} while (0) |