[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 24/30] libvhost-user-glib: use g_main_context_get_thread_defaul
From: |
Michael S. Tsirkin |
Subject: |
[PULL v2 24/30] libvhost-user-glib: use g_main_context_get_thread_default() |
Date: |
Wed, 26 Feb 2020 04:07:34 -0500 |
From: Johannes Berg <address@hidden>
If we use NULL, we just get the main program default mainloop
here. Using g_main_context_get_thread_default() has basically
the same effect, but it lets us start different devices in
different threads with different mainloops, which can be useful.
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Signed-off-by: Johannes Berg <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
contrib/libvhost-user/libvhost-user-glib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/libvhost-user/libvhost-user-glib.c
b/contrib/libvhost-user/libvhost-user-glib.c
index 824c7780de..53f1ca4cdd 100644
--- a/contrib/libvhost-user/libvhost-user-glib.c
+++ b/contrib/libvhost-user/libvhost-user-glib.c
@@ -89,7 +89,7 @@ vug_source_new(VugDev *gdev, int fd, GIOCondition cond,
src->gfd.events = cond;
g_source_add_poll(gsrc, &src->gfd);
- id = g_source_attach(gsrc, NULL);
+ id = g_source_attach(gsrc, g_main_context_get_thread_default());
g_assert(id);
return gsrc;
--
MST
- [PULL v2 14/30] virtio-iommu: Implement attach/detach command, (continued)
- [PULL v2 14/30] virtio-iommu: Implement attach/detach command, Michael S. Tsirkin, 2020/02/26
- [PULL v2 15/30] virtio-iommu: Implement map/unmap, Michael S. Tsirkin, 2020/02/26
- [PULL v2 16/30] virtio-iommu: Implement translate, Michael S. Tsirkin, 2020/02/26
- [PULL v2 17/30] virtio-iommu: Implement fault reporting, Michael S. Tsirkin, 2020/02/26
- [PULL v2 18/30] virtio-iommu: Support migration, Michael S. Tsirkin, 2020/02/26
- [PULL v2 19/30] virtio-iommu-pci: Add virtio iommu pci support, Michael S. Tsirkin, 2020/02/26
- [PULL v2 20/30] hw/arm/virt: Add the virtio-iommu device tree mappings, Michael S. Tsirkin, 2020/02/26
- [PULL v2 21/30] MAINTAINERS: add virtio-iommu related files, Michael S. Tsirkin, 2020/02/26
- [PULL v2 22/30] libvhost-user: implement VHOST_USER_PROTOCOL_F_REPLY_ACK, Michael S. Tsirkin, 2020/02/26
- [PULL v2 23/30] libvhost-user-glib: fix VugDev main fd cleanup, Michael S. Tsirkin, 2020/02/26
- [PULL v2 24/30] libvhost-user-glib: use g_main_context_get_thread_default(),
Michael S. Tsirkin <=
- [PULL v2 25/30] libvhost-user: handle NOFD flag in call/kick/err better, Michael S. Tsirkin, 2020/02/26
- [PULL v2 26/30] docs: vhost-user: add in-band kick/call messages, Michael S. Tsirkin, 2020/02/26
- [PULL v2 27/30] libvhost-user: implement in-band notifications, Michael S. Tsirkin, 2020/02/26
- [PULL v2 28/30] acpi: cpuhp: document CPHP_GET_CPU_ID_CMD command, Michael S. Tsirkin, 2020/02/26
- [PULL v2 29/30] vhost-user: only set slave channel for first vq, Michael S. Tsirkin, 2020/02/26
- [PULL v2 30/30] Fixed assert in vhost_user_set_mem_table_postcopy, Michael S. Tsirkin, 2020/02/26
- Re: [PULL v2 00/30] virtio, pc: fixes, features, Michael S. Tsirkin, 2020/02/27