thread/Name: set thread names

For debugging.
This commit is contained in:
Max Kellermann
2014-01-23 10:07:14 +01:00
parent 1d547fe273
commit ec41d849bb
7 changed files with 79 additions and 0 deletions

View File

@@ -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();