Add a 'name' parameter to qemu_thread_create

If enabled, set the thread name at creation (on GNU systems with
  pthread_set_np)
Fix up all the callers with a thread name

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
Dr. David Alan Gilbert authored and Michael S. Tsirkin committed 2014-03-09 21:09:38 +02:00
1 parent 8f480de0c9
commit 4900116e6f
11 files changed
+41 -19

No files matched your search

+1 -1
View File
@@ -140,7 +140,7 @@ static void do_spawn_thread(ThreadPool *pool)
pool->new_threads--;
pool->pending_threads++;
qemu_thread_create(&t, worker_thread, pool, QEMU_THREAD_DETACHED);
qemu_thread_create(&t, "worker", worker_thread, pool, QEMU_THREAD_DETACHED);
}
static void spawn_thread_bh_fn(void *opaque)