]> git.proxmox.com Git - mirror_qemu.git/commitdiff
chardev: use backend chr context when watch for fe
authorPeter Xu <peterx@redhat.com>
Thu, 4 Jan 2018 14:18:33 +0000 (22:18 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 12 Jan 2018 12:22:02 +0000 (13:22 +0100)
In commit 6bbb6c0644 ("chardev: use per-dev context for
io_add_watch_poll", 2017-09-22) all the chardev watches are converted to
use per-chardev gcontext to support chardev to be run outside default
main thread.  However that's still missing one call from the frontend
code.  Touch that up.

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20180104141835.17987-2-peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
chardev/char-fe.c

index ee6d5961003192237898c08ed04c891999fb595f..c611b3fa3e0f432a3bb719a3af30403a437f73f0 100644 (file)
@@ -356,7 +356,7 @@ guint qemu_chr_fe_add_watch(CharBackend *be, GIOCondition cond,
     }
 
     g_source_set_callback(src, (GSourceFunc)func, user_data, NULL);
-    tag = g_source_attach(src, NULL);
+    tag = g_source_attach(src, s->gcontext);
     g_source_unref(src);
 
     return tag;