[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC v6 01/27] chardev: use backend chr context when wa
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [RFC v6 01/27] chardev: use backend chr context when watch for fe |
Date: |
Wed, 20 Dec 2017 16:40:05 +0000 |
User-agent: |
Mutt/1.9.1 (2017-09-22) |
On Tue, Dec 19, 2017 at 04:45:31PM +0800, Peter Xu wrote:
> 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.
>
> Signed-off-by: Peter Xu <address@hidden>
> ---
> 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..462c529f19 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, be->chr->gcontext);
If you respin, it's a little nicer to use the s local variable instead:
tag = g_source_attach(src, s->gcontext);
signature.asc
Description: PGP signature
- [Qemu-devel] [RFC v6 00/27] QMP: out-of-band (OOB) execution support, Peter Xu, 2017/12/19
- [Qemu-devel] [RFC v6 01/27] chardev: use backend chr context when watch for fe, Peter Xu, 2017/12/19
- [Qemu-devel] [RFC v6 02/27] qobject: introduce qstring_get_try_str(), Peter Xu, 2017/12/19
- [Qemu-devel] [RFC v6 03/27] qobject: introduce qobject_get_try_str(), Peter Xu, 2017/12/19
- [Qemu-devel] [RFC v6 04/27] qobject: let object_property_get_str() use new API, Peter Xu, 2017/12/19
- [Qemu-devel] [RFC v6 05/27] monitor: move skip_flush into monitor_data_init, Peter Xu, 2017/12/19
- [Qemu-devel] [RFC v6 06/27] monitor: move the cur_mon hack deeper for QMP, Peter Xu, 2017/12/19
- [Qemu-devel] [RFC v6 07/27] monitor: unify global init, Peter Xu, 2017/12/19