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@xxxxxxxxxx> > --- > 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@xxxxxxxxxx>
Attachment:
signature.asc
Description: PGP signature