diff options
author | Marc-André Lureau | 2019-01-17 12:43:55 +0100 |
---|---|---|
committer | Samuel Thibault | 2019-02-07 14:49:08 +0100 |
commit | 1ab67b98cdd78b94ce818a7d0a964e3e4d7a4538 (patch) | |
tree | 6170bef3ba22ffbe442ccd9e0336bbbbc0e49297 /include | |
parent | slirp: improve send_packet() callback (diff) | |
download | qemu-1ab67b98cdd78b94ce818a7d0a964e3e4d7a4538.tar.gz qemu-1ab67b98cdd78b94ce818a7d0a964e3e4d7a4538.tar.xz qemu-1ab67b98cdd78b94ce818a7d0a964e3e4d7a4538.zip |
slirp: replace global polling with per-instance & notifier
Remove hard-coded dependency on slirp in main-loop, and use a "poll"
notifier instead. The notifier is registered per slirp instance.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/qemu/main-loop.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/qemu/main-loop.h b/include/qemu/main-loop.h index e59f9ae1e9..f6ba78ea73 100644 --- a/include/qemu/main-loop.h +++ b/include/qemu/main-loop.h @@ -302,4 +302,19 @@ void qemu_fd_register(int fd); QEMUBH *qemu_bh_new(QEMUBHFunc *cb, void *opaque); void qemu_bh_schedule_idle(QEMUBH *bh); +enum { + MAIN_LOOP_POLL_FILL, + MAIN_LOOP_POLL_ERR, + MAIN_LOOP_POLL_OK, +}; + +typedef struct MainLoopPoll { + int state; + uint32_t timeout; + GArray *pollfds; +} MainLoopPoll; + +void main_loop_poll_add_notifier(Notifier *notify); +void main_loop_poll_remove_notifier(Notifier *notify); + #endif |