aio-win32: add support for sockets
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 9 Jul 2014 09:53:10 +0000 (11:53 +0200)
committerStefan Hajnoczi <stefanha@redhat.com>
Fri, 29 Aug 2014 09:46:58 +0000 (10:46 +0100)
commitb493317d344357f7ac56606246d09b5604e54ab6
tree70d229bfc876df17b21218be917394dd384cdb8a
parent79d9b6566b90efac072720f37a1b57d73f539264
aio-win32: add support for sockets

Uses the same select/WSAEventSelect scheme as main-loop.c.
WSAEventSelect() is edge-triggered, so it cannot be used
directly, but it is still used as a way to exit from a
blocking g_poll().

Before g_poll() is called, we poll sockets with a non-blocking
select() to achieve the level-triggered semantics we require:
if a socket is ready, the g_poll() is made non-blocking too.

Based on a patch from Or Goshen.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
aio-win32.c
block/Makefile.objs
include/block/aio.h