mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
osdep: NetBSD pthread_setname_np()
From: bugmen0t on github Fixes #1207.
This commit is contained in:
@@ -19,6 +19,10 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#if HAVE_BSD_THREAD_NAME
|
||||
#include <pthread_np.h>
|
||||
#endif
|
||||
|
||||
#include "threads.h"
|
||||
#include "timer.h"
|
||||
|
||||
@@ -56,6 +60,8 @@ void mpthread_set_name(const char *name)
|
||||
}
|
||||
#elif HAVE_BSD_THREAD_NAME
|
||||
pthread_set_name_np(pthread_self(), tname);
|
||||
#elif HAVE_NETBSD_THREAD_NAME
|
||||
pthread_setname_np(pthread_self(), "%s", (void *)tname);
|
||||
#elif HAVE_OSX_THREAD_NAME
|
||||
pthread_setname_np(tname);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user