[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 06/15] qio: store gsources for net listeners
From: |
Peter Xu |
Subject: |
Re: [Qemu-devel] [PATCH v2 06/15] qio: store gsources for net listeners |
Date: |
Fri, 2 Mar 2018 12:10:40 +0800 |
User-agent: |
Mutt/1.9.1 (2017-09-22) |
On Thu, Mar 01, 2018 at 06:12:57PM +0100, Paolo Bonzini wrote:
> On 01/03/2018 09:44, Peter Xu wrote:
> > Originally we were storing the GSources tag IDs. That'll be not enough
> > if we are going to support non-default gcontext for QIO code. Switch to
> > GSources without changing anything real. Now we still always pass in
> > NULL, which means the default gcontext.
> >
> > Signed-off-by: Peter Xu <address@hidden>
> > ---
> > include/io/net-listener.h | 21 ++++++++++++++--
> > io/net-listener.c | 62
> > +++++++++++++++++++++++++++++------------------
> > 2 files changed, 58 insertions(+), 25 deletions(-)
> >
> > diff --git a/include/io/net-listener.h b/include/io/net-listener.h
> > index 56d6da7a76..566be283b3 100644
> > --- a/include/io/net-listener.h
> > +++ b/include/io/net-listener.h
> > @@ -53,7 +53,7 @@ struct QIONetListener {
> >
> > char *name;
> > QIOChannelSocket **sioc;
> > - gulong *io_tag;
> > + GSource **io_source;
> > size_t nsioc;
> >
> > bool connected;
> > @@ -120,17 +120,34 @@ void qio_net_listener_add(QIONetListener *listener,
> > QIOChannelSocket *sioc);
> >
> > /**
> > - * qio_net_listener_set_client_func:
> > + * qio_net_listener_set_client_func_full:
> > * @listener: the network listener object
> > * @func: the callback function
> > * @data: opaque data to pass to @func
> > * @notify: callback to free @data
> > + * @context: the context that the sources will be bound to
>
> Please add a note like "if %NULL, the default context will be used".
Will do. Thanks,
--
Peter Xu
- Re: [Qemu-devel] [PATCH v2 03/15] qio: introduce qio_channel_add_watch_{full|source}, (continued)
[Qemu-devel] [PATCH v2 06/15] qio: store gsources for net listeners, Peter Xu, 2018/03/01
[Qemu-devel] [PATCH v2 07/15] qio/chardev: update net listener gcontext, Peter Xu, 2018/03/01
[Qemu-devel] [PATCH v2 08/15] chardev: allow telnet gsource to switch gcontext, Peter Xu, 2018/03/01