diff options
author | James Ross-Gowan <rossymiles@gmail.com> | 2017-05-17 23:33:35 +1000 |
---|---|---|
committer | James Ross-Gowan <rossymiles@gmail.com> | 2017-05-18 00:11:14 +1000 |
commit | bc381dd05e654d106b6cb4d7d94b27b9afe2bf30 (patch) | |
tree | b342778416921a944b24be721b7aed729b48ff0d /osdep/threads.c | |
parent | 6a000598504b60a198236eae93f08801dd6ebeb7 (diff) | |
download | mpv-bc381dd05e654d106b6cb4d7d94b27b9afe2bf30.tar.bz2 mpv-bc381dd05e654d106b6cb4d7d94b27b9afe2bf30.tar.xz |
win32: pthread: use the new thread naming API
Windows, as of the Creators Update, finally has a sane API for giving a
name to a thread that can be used by debuggers. This is similar to
pthread_setname_np on Linux and some Unixes. Expose it in the pthread
wrapper and use it for mpthread_set_name().
Diffstat (limited to 'osdep/threads.c')
-rw-r--r-- | osdep/threads.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/osdep/threads.c b/osdep/threads.c index e4bd0b7758..53d332396d 100644 --- a/osdep/threads.c +++ b/osdep/threads.c @@ -47,7 +47,7 @@ void mpthread_set_name(const char *name) tname[15] = '\0'; // glibc-checked kernel limit pthread_setname_np(pthread_self(), tname); } -#elif HAVE_BSD_THREAD_NAME +#elif HAVE_WIN32_INTERNAL_PTHREADS || HAVE_BSD_THREAD_NAME pthread_set_name_np(pthread_self(), tname); #elif HAVE_NETBSD_THREAD_NAME pthread_setname_np(pthread_self(), "%s", (void *)tname); |