aboutsummaryrefslogtreecommitdiffstats
path: root/src/IOThread.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-23 10:07:14 +0100
committerMax Kellermann <max@duempel.org>2014-01-23 10:07:14 +0100
commitec41d849bbc460d4002ae19e3891b3bda513307e (patch)
tree21c08a38ecd7de939af5fcd08afce9b595fa897c /src/IOThread.cxx
parent1d547fe273b094e073ed1ad1b96df59ace4380f3 (diff)
downloadmpd-ec41d849bbc460d4002ae19e3891b3bda513307e.tar.gz
mpd-ec41d849bbc460d4002ae19e3891b3bda513307e.tar.xz
mpd-ec41d849bbc460d4002ae19e3891b3bda513307e.zip
thread/Name: set thread names
For debugging.
Diffstat (limited to 'src/IOThread.cxx')
-rw-r--r--src/IOThread.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/IOThread.cxx b/src/IOThread.cxx
index 8877d3c2d..e21ede4f3 100644
--- a/src/IOThread.cxx
+++ b/src/IOThread.cxx
@@ -22,6 +22,7 @@
#include "thread/Mutex.hxx"
#include "thread/Cond.hxx"
#include "thread/Thread.hxx"
+#include "thread/Name.hxx"
#include "event/Loop.hxx"
#include "system/FatalError.hxx"
#include "util/Error.hxx"
@@ -48,6 +49,8 @@ io_thread_run(void)
static void
io_thread_func(gcc_unused void *arg)
{
+ SetThreadName("io");
+
/* lock+unlock to synchronize with io_thread_start(), to be
sure that io.thread is set */
io.mutex.lock();