summaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dgilbert@redhat.com>2014-01-30 10:20:32 +0000
committerMichael S. Tsirkin <mst@redhat.com>2014-03-09 21:09:38 +0200
commit4900116e6f0edef6877c0e8a9ca19957d47765c9 (patch)
tree8ecc45f0f28d012d2ffc8dad01352654444b89c9 /hw
parent8f480de0c91a18d550721f8d9af969ebfbda0793 (diff)
downloadhqemu-4900116e6f0edef6877c0e8a9ca19957d47765c9.zip
hqemu-4900116e6f0edef6877c0e8a9ca19957d47765c9.tar.gz
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>
Diffstat (limited to 'hw')
-rw-r--r--hw/block/dataplane/virtio-blk.c2
-rw-r--r--hw/usb/ccid-card-emulated.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c
index 2237edb..d1c7ad4 100644
--- a/hw/block/dataplane/virtio-blk.c
+++ b/hw/block/dataplane/virtio-blk.c
@@ -358,7 +358,7 @@ static void start_data_plane_bh(void *opaque)
qemu_bh_delete(s->start_bh);
s->start_bh = NULL;
- qemu_thread_create(&s->thread, data_plane_thread,
+ qemu_thread_create(&s->thread, "data_plane", data_plane_thread,
s, QEMU_THREAD_JOINABLE);
}
diff --git a/hw/usb/ccid-card-emulated.c b/hw/usb/ccid-card-emulated.c
index aa913df..7213c89 100644
--- a/hw/usb/ccid-card-emulated.c
+++ b/hw/usb/ccid-card-emulated.c
@@ -546,10 +546,10 @@ static int emulated_initfn(CCIDCardState *base)
printf("%s: failed to initialize vcard\n", EMULATED_DEV_NAME);
return -1;
}
- qemu_thread_create(&card->event_thread_id, event_thread, card,
- QEMU_THREAD_JOINABLE);
- qemu_thread_create(&card->apdu_thread_id, handle_apdu_thread, card,
- QEMU_THREAD_JOINABLE);
+ qemu_thread_create(&card->event_thread_id, "ccid/event", event_thread,
+ card, QEMU_THREAD_JOINABLE);
+ qemu_thread_create(&card->apdu_thread_id, "ccid/apdu", handle_apdu_thread,
+ card, QEMU_THREAD_JOINABLE);
return 0;
}
OpenPOWER on IntegriCloud