aboutsummaryrefslogtreecommitdiffhomepage
path: root/osdep/terminal-win.c
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2014-10-19 23:32:34 +0200
committerGravatar wm4 <wm4@nowhere>2014-10-19 23:48:40 +0200
commit9ba66418790f184339ad3a891f525d54459d6369 (patch)
tree0ddfa7df4ba0e7684ee9b12938c0dc07f4c5f64b /osdep/terminal-win.c
parentc6dca55665e2710163437f09c04033d4b30e2e1a (diff)
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/terminal-win.c')
-rw-r--r--osdep/terminal-win.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/osdep/terminal-win.c b/osdep/terminal-win.c
index 9bfb97041b..678cedb775 100644
--- a/osdep/terminal-win.c
+++ b/osdep/terminal-win.c
@@ -37,6 +37,7 @@
#include "input/input.h"
#include "terminal.h"
#include "osdep/io.h"
+#include "osdep/threads.h"
#include "osdep/w32_keyboard.h"
#define hSTDOUT GetStdHandle(STD_OUTPUT_HANDLE)
@@ -122,6 +123,7 @@ static void read_input(void)
static void *input_thread_fn(void *ptr)
{
+ mpthread_set_name("terminal");
HANDLE in = GetStdHandle(STD_INPUT_HANDLE);
HANDLE stuff[2] = {in, death};
while (1) {