diff options
author | wm4 <wm4@nowhere> | 2014-10-19 23:32:34 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-10-19 23:48:40 +0200 |
commit | 9ba66418790f184339ad3a891f525d54459d6369 (patch) | |
tree | 0ddfa7df4ba0e7684ee9b12938c0dc07f4c5f64b /osdep/threads.h | |
parent | c6dca55665e2710163437f09c04033d4b30e2e1a (diff) | |
download | mpv-9ba66418790f184339ad3a891f525d54459d6369.tar.bz2 mpv-9ba66418790f184339ad3a891f525d54459d6369.tar.xz |
Set thread name for debugging
Especially with other components (libavcodec, OSX stuff), the thread
list can get quite populated. Setting the thread name helps when
debugging.
Since this is not portable, we check the OS variants in waf configure.
old-configure just gets a special-case for glibc, since doing a full
check here would probably be a waste of effort.
Diffstat (limited to 'osdep/threads.h')
-rw-r--r-- | osdep/threads.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/osdep/threads.h b/osdep/threads.h index fa9199d63d..2277fa65a1 100644 --- a/osdep/threads.h +++ b/osdep/threads.h @@ -16,4 +16,7 @@ int mpthread_cond_timedwait_rel(pthread_cond_t *cond, pthread_mutex_t *mutex, // Helper to reduce boiler plate. int mpthread_mutex_init_recursive(pthread_mutex_t *mutex); +// Set thread name (for debuggers). +void mpthread_set_name(const char *name); + #endif |