mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
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>
This commit is contained in:
parent
625a526b32
commit
1ab67b98cd
7 changed files with 374 additions and 350 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue