qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	peterx@redhat.com,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: [Qemu-devel] [PATCH 1/3] chardev: use backend chr context when watch for fe
Date: Thu, 28 Dec 2017 15:29:43 +0800	[thread overview]
Message-ID: <20171228072945.9573-2-peterx@redhat.com> (raw)
In-Reply-To: <20171228072945.9573-1-peterx@redhat.com>

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>
Signed-off-by: Peter Xu <peterx@redhat.com>
---
 chardev/char-fe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/chardev/char-fe.c b/chardev/char-fe.c
index ee6d596100..c611b3fa3e 100644
--- a/chardev/char-fe.c
+++ b/chardev/char-fe.c
@@ -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;
-- 
2.14.3

  reply	other threads:[~2017-12-28  7:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-28  7:29 [Qemu-devel] [PATCH 0/3] chardev: convert leftover glib APIs to use dedicate gcontext Peter Xu
2017-12-28  7:29 ` Peter Xu [this message]
2018-01-02 16:02   ` [Qemu-devel] [PATCH 1/3] chardev: use backend chr context when watch for fe Marc-André Lureau
2017-12-28  7:29 ` [Qemu-devel] [PATCH 2/3] chardev: let g_idle_add() be with chardev gcontext Peter Xu
2018-01-02 16:02   ` Marc-André Lureau
2017-12-28  7:29 ` [Qemu-devel] [PATCH 3/3] chardev: introduce qemu_chr_timeout_add() and use Peter Xu
2018-01-02 16:10   ` Marc-André Lureau
2018-01-03  2:06     ` Peter Xu
2018-01-03  7:10 ` [Qemu-devel] [PATCH 0/3] chardev: convert leftover glib APIs to use dedicate gcontext Paolo Bonzini
2018-01-03  8:54   ` Peter Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171228072945.9573-2-peterx@redhat.com \
    --to=peterx@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).