diff options
author | Henrik Gramner <gramner@twoorioles.com> | 2019-07-29 16:12:35 +0300 |
---|---|---|
committer | Henrik Gramner <henrik@gramner.com> | 2019-08-08 23:32:53 +0300 |
commit | 6c3e85de57884820ee5f2a4e5cd8ff7a2ee73b79 (patch) | |
tree | aa89c755c2d5b14d4a3c94da39d7801e2e120483 /src/thread.h | |
parent | b0d00020e06a3528977b977c61a252e91969b1a0 (diff) |
Set thread names on Windows 10
Diffstat (limited to 'src/thread.h')
-rw-r--r-- | src/thread.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/thread.h b/src/thread.h index b0c206d..f86e338 100644 --- a/src/thread.h +++ b/src/thread.h @@ -48,6 +48,10 @@ typedef SRWLOCK pthread_mutex_t; typedef CONDITION_VARIABLE pthread_cond_t; typedef INIT_ONCE pthread_once_t; +void dav1d_init_thread(void); +void dav1d_set_thread_name(const wchar_t *name); +#define dav1d_set_thread_name(name) dav1d_set_thread_name(L##name) + int dav1d_pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*func)(void*), void *arg); int dav1d_pthread_join(pthread_t *thread, void **res); @@ -126,7 +130,7 @@ static inline int pthread_cond_broadcast(pthread_cond_t *const cond) { #include <pthread.h> -#endif +#define dav1d_init_thread() while (0) /* Thread naming support */ @@ -159,7 +163,9 @@ static inline void dav1d_set_thread_name(const char* name) { #else -#define dav1d_set_thread_name(name) +#define dav1d_set_thread_name(name) while (0) + +#endif #endif |