aboutsummaryrefslogtreecommitdiffhomepage
path: root/input/ipc.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 /input/ipc.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 'input/ipc.c')
-rw-r--r--input/ipc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/input/ipc.c b/input/ipc.c
index a64be27de3..0fc6208faa 100644
--- a/input/ipc.c
+++ b/input/ipc.c
@@ -29,6 +29,7 @@
#include "config.h"
#include "osdep/io.h"
+#include "osdep/threads.h"
#include "common/common.h"
#include "common/global.h"
@@ -471,6 +472,8 @@ static void *client_thread(void *p)
struct client_arg *arg = p;
bstr client_msg = { talloc_strdup(NULL, ""), 0 };
+ mpthread_set_name(arg->client_name);
+
int pipe_fd = mpv_get_wakeup_pipe(arg->client);
if (pipe_fd < 0) {
MP_ERR(arg, "Could not get wakeup pipe\n");
@@ -649,6 +652,8 @@ static void *ipc_thread(void *p)
struct mp_ipc_ctx *arg = p;
+ mpthread_set_name("ipc socket listener");
+
MP_INFO(arg, "Starting IPC master\n");
ipc_fd = socket(AF_UNIX, SOCK_STREAM, 0);