[libvirt PATCH v3 2/7] src: introduce helper API for creating GSource for socket
Pavel Hrdina
phrdina at redhat.com
Thu Feb 6 14:11:47 UTC 2020
On Wed, Feb 05, 2020 at 05:18:53PM +0000, Daniel P. Berrangé wrote:
> We need to be able to create event loop watches using the
> GSource API for sockets. GIOChannel is able todo this, but
> we don't want to use the GIOChannel APIs for reading/writing,
> and testing shows just using its GSource APIs is unreliable
> on Windows.
>
> This patch thus creates a standalone helper API for creating
> a GSource for a socket file descriptor. This impl is derived
> from code in QEMU's io/channel-watch.c file that was written
> by myself & Paolo Bonzini & thus under Red Hat copyright.
>
> Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
> ---
> build-aux/syntax-check.mk | 3 +
> src/util/Makefile.inc.am | 2 +
> src/util/vireventglibwatch.c | 249 +++++++++++++++++++++++++++++++++++
> src/util/vireventglibwatch.h | 48 +++++++
> 4 files changed, 302 insertions(+)
> create mode 100644 src/util/vireventglibwatch.c
> create mode 100644 src/util/vireventglibwatch.h
Reviewed-by: Pavel Hrdina <phrdina at redhat.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20200206/2b59105c/attachment-0001.sig>
More information about the libvir-list
mailing list