From 9ba66418790f184339ad3a891f525d54459d6369 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 19 Oct 2014 23:32:34 +0200 Subject: 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. --- osdep/terminal-unix.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'osdep/terminal-unix.c') diff --git a/osdep/terminal-unix.c b/osdep/terminal-unix.c index bb5ae324ff..f17524c0f1 100644 --- a/osdep/terminal-unix.c +++ b/osdep/terminal-unix.c @@ -45,6 +45,7 @@ #include #include "osdep/io.h" +#include "osdep/threads.h" #include "common/common.h" #include "misc/bstr.h" @@ -757,6 +758,7 @@ static void quit_request_sighandler(int signum) static void *terminal_thread(void *ptr) { + mpthread_set_name("terminal"); bool stdin_ok = isatty(STDIN_FILENO); // if false, we still wait for SIGTERM while (1) { struct pollfd fds[2] = { -- cgit v1.2.3