Commit e044c0f8 authored by Michael S. Tsirkin's avatar Michael S. Tsirkin
Browse files

Revert "qemu: add a cleanup callback function to EventNotifier"



This reverts commit f87d72f5 as that is
part of a patchset reported to break cleanup and migration.

Cc: Gal Hammer <ghammer@redhat.com>
Cc: Sitong Liu <siliu@redhat.com>
Cc: Xiaoling Gao <xiagao@redhat.com>
Suggested-by: default avatarGreg Kurz <groug@kaod.org>
Suggested-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Reported-by: default avatarJose Ricardo Ziviani <joserz@linux.vnet.ibm.com>
Reported-by: default avatarDaniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
parent 1ef8185a
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -26,7 +26,6 @@ struct EventNotifier {
    int rfd;
    int wfd;
#endif
    void (*cleanup)(EventNotifier *);
};

typedef void EventNotifierHandler(EventNotifier *);
+1 −4
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@ void event_notifier_init_fd(EventNotifier *e, int fd)
{
    e->rfd = fd;
    e->wfd = fd;
    e->cleanup = NULL;
}
#endif

@@ -66,7 +65,6 @@ int event_notifier_init(EventNotifier *e, int active)
        e->rfd = fds[0];
        e->wfd = fds[1];
    }
    e->cleanup = NULL;
    if (active) {
        event_notifier_set(e);
    }
@@ -82,11 +80,10 @@ void event_notifier_cleanup(EventNotifier *e)
{
    if (e->rfd != e->wfd) {
        close(e->rfd);
        e->rfd = -1;
    }
    close(e->wfd);
    e->rfd = -1;
    e->wfd = -1;
    e->cleanup = NULL;
}

int event_notifier_get_fd(const EventNotifier *e)
+0 −2
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ int event_notifier_init(EventNotifier *e, int active)
{
    e->event = CreateEvent(NULL, TRUE, FALSE, NULL);
    assert(e->event);
    e->cleanup = NULL;
    return 0;
}

@@ -27,7 +26,6 @@ void event_notifier_cleanup(EventNotifier *e)
{
    CloseHandle(e->event);
    e->event = NULL;
    e->cleanup = NULL;
}

HANDLE event_notifier_get_handle(EventNotifier *e)