summaryrefslogtreecommitdiffstats
path: root/osdep/win32/include
diff options
context:
space:
mode:
authorJames Ross-Gowan <rossymiles@gmail.com>2017-05-17 23:33:35 +1000
committerJames Ross-Gowan <rossymiles@gmail.com>2017-05-18 00:11:14 +1000
commitbc381dd05e654d106b6cb4d7d94b27b9afe2bf30 (patch)
treeb342778416921a944b24be721b7aed729b48ff0d /osdep/win32/include
parent6a000598504b60a198236eae93f08801dd6ebeb7 (diff)
downloadmpv-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/win32/include')
-rw-r--r--osdep/win32/include/pthread.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/osdep/win32/include/pthread.h b/osdep/win32/include/pthread.h
index 870e9d7d5c..271cae0f0a 100644
--- a/osdep/win32/include/pthread.h
+++ b/osdep/win32/include/pthread.h
@@ -33,6 +33,7 @@
#define pthread_join m_pthread_join
#define pthread_detach m_pthread_detach
#define pthread_create m_pthread_create
+#define pthread_set_name_np m_pthread_set_name_np
#define pthread_once_t INIT_ONCE
#define PTHREAD_ONCE_INIT INIT_ONCE_STATIC_INIT
@@ -97,4 +98,6 @@ int pthread_detach(pthread_t thread);
int pthread_create(pthread_t *thread, const pthread_attr_t *attr,
void *(*start_routine) (void *), void *arg);
+void pthread_set_name_np(pthread_t thread, const char *name);
+
#endif