[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 11/16] main-loop: remove qemu_fd_register(), win32/slirp/s

From: Stefan Berger
Subject: Re: [PATCH v3 11/16] main-loop: remove qemu_fd_register(), win32/slirp/socket specific
Date: Thu, 2 Mar 2023 13:43:31 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1

On 2/21/23 07:47, marcandre.lureau@redhat.com wrote:
From: Marc-André Lureau <marcandre.lureau@redhat.com>

Open-code the socket registration where it's needed, to avoid
artificially used or unclear generic interface.

Furthermore, the following patches are going to make socket handling use
FD-only inside QEMU, but we need to handle win32 SOCKET from libslirp.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
  include/qemu/main-loop.h |  2 --
  net/slirp.c              |  8 +++++++-
  util/main-loop.c         | 11 -----------
  3 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/include/qemu/main-loop.h b/include/qemu/main-loop.h
index c25f390696..b3e54e00bc 100644
--- a/include/qemu/main-loop.h
+++ b/include/qemu/main-loop.h
@@ -387,8 +387,6 @@ void qemu_cond_timedwait_iothread(QemuCond *cond, int ms);

  /* internal interfaces */

-void qemu_fd_register(int fd);
  #define qemu_bh_new(cb, opaque) \
      qemu_bh_new_full((cb), (opaque), (stringify(cb)))
  QEMUBH *qemu_bh_new_full(QEMUBHFunc *cb, void *opaque, const char *name);
diff --git a/net/slirp.c b/net/slirp.c
index 2ee3f1a0d7..0730a935ba 100644
--- a/net/slirp.c
+++ b/net/slirp.c
@@ -248,7 +248,13 @@ static void net_slirp_timer_mod(void *timer, int64_t 

  static void net_slirp_register_poll_fd(int fd, void *opaque)
-    qemu_fd_register(fd);
+#ifdef WIN32

_WIN32 ?

With this fixed:

Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]