Re: [Qemu-devel] [PATCH 03/14] qio: introduce qio_channel_add_watch_full()

2018-02-28 Thread Peter Xu
On Wed, Feb 28, 2018 at 12:47:43PM +, Daniel P. Berrangé wrote: > On Wed, Feb 28, 2018 at 08:44:24PM +0800, Peter Xu wrote: > > On Wed, Feb 28, 2018 at 09:08:45AM +, Daniel P. Berrangé wrote: > > > On Wed, Feb 28, 2018 at 01:06:22PM +0800, Peter Xu wrote: > > > > It's a more powerful versio

Re: [Qemu-devel] [PATCH 03/14] qio: introduce qio_channel_add_watch_full()

2018-02-28 Thread Daniel P . Berrangé
On Wed, Feb 28, 2018 at 08:44:24PM +0800, Peter Xu wrote: > On Wed, Feb 28, 2018 at 09:08:45AM +, Daniel P. Berrangé wrote: > > On Wed, Feb 28, 2018 at 01:06:22PM +0800, Peter Xu wrote: > > > It's a more powerful version of qio_channel_add_watch(), which supports > > > non-default gcontext. It

Re: [Qemu-devel] [PATCH 03/14] qio: introduce qio_channel_add_watch_full()

2018-02-28 Thread Peter Xu
On Wed, Feb 28, 2018 at 09:08:45AM +, Daniel P. Berrangé wrote: > On Wed, Feb 28, 2018 at 01:06:22PM +0800, Peter Xu wrote: > > It's a more powerful version of qio_channel_add_watch(), which supports > > non-default gcontext. It's stripped from the old one, then we have > > g_source_get_id() t

Re: [Qemu-devel] [PATCH 03/14] qio: introduce qio_channel_add_watch_full()

2018-02-28 Thread Daniel P . Berrangé
On Wed, Feb 28, 2018 at 01:06:22PM +0800, Peter Xu wrote: > It's a more powerful version of qio_channel_add_watch(), which supports > non-default gcontext. It's stripped from the old one, then we have > g_source_get_id() to fetch the tag ID to keep the old interface. > > Note that the new API wil

[Qemu-devel] [PATCH 03/14] qio: introduce qio_channel_add_watch_full()

2018-02-27 Thread Peter Xu
It's a more powerful version of qio_channel_add_watch(), which supports non-default gcontext. It's stripped from the old one, then we have g_source_get_id() to fetch the tag ID to keep the old interface. Note that the new API will return a gsource, meanwhile keep a reference of it so that callers