win32: drop fd registration to the main-loop on setting non-block
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Fri, 18 Dec 2020 13:57:11 +0000 (17:57 +0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 6 Jan 2021 09:21:20 +0000 (10:21 +0100)
Low-level fd users from QEMU use aio_set_fd_handler(), which handles
event registration with the main loop; qemu_fd_register() is only
needed together with the main loop's poll notifiers, of which SLIRP
is the only user.

This removes a dependency from oslib-win32.c to main-loop.c.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20201218135712.674094-1-marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
util/oslib-win32.c

index 23a7c7320b1f9b2c94a5e804c09a777beaa70c93..01787df74cb768a6d7d8eaf15eca02de96d35e38 100644 (file)
@@ -221,7 +221,6 @@ int qemu_try_set_nonblock(int fd)
     if (ioctlsocket(fd, FIONBIO, &opt) != NO_ERROR) {
         return -socket_error();
     }
-    qemu_fd_register(fd);
     return 0;
 }