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 2014-01-30 10:20:32 +00:00 committed by Michael S. Tsirkin
parent 8f480de0c9
commit 4900116e6f
11 changed files with 41 additions and 19 deletions

View file

@ -88,7 +88,8 @@ static int qemu_signalfd_compat(const sigset_t *mask)
memcpy(&info->mask, mask, sizeof(*mask));
info->fd = fds[1];
qemu_thread_create(&thread, sigwait_compat, info, QEMU_THREAD_DETACHED);
qemu_thread_create(&thread, "signalfd_compat", sigwait_compat, info,
QEMU_THREAD_DETACHED);
return fds[0];
}