Skip to content

Commit e044c0f

Browse files
committedJan 24, 2018
Revert "qemu: add a cleanup callback function to EventNotifier"
This reverts commit f87d72f as that is part of a patchset reported to break cleanup and migration. Cc: Gal Hammer <[email protected]> Cc: Sitong Liu <[email protected]> Cc: Xiaoling Gao <[email protected]> Suggested-by: Greg Kurz <[email protected]> Suggested-by: Paolo Bonzini <[email protected]> Reported-by: Jose Ricardo Ziviani <[email protected]> Reported-by: Daniel Henrique Barboza <[email protected]>
1 parent 1ef8185 commit e044c0f

File tree

3 files changed

+1
-7
lines changed

3 files changed

+1
-7
lines changed
 

‎include/qemu/event_notifier.h

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ struct EventNotifier {
2626
int rfd;
2727
int wfd;
2828
#endif
29-
void (*cleanup)(EventNotifier *);
3029
};
3130

3231
typedef void EventNotifierHandler(EventNotifier *);

‎util/event_notifier-posix.c

+1-4
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ void event_notifier_init_fd(EventNotifier *e, int fd)
2929
{
3030
e->rfd = fd;
3131
e->wfd = fd;
32-
e->cleanup = NULL;
3332
}
3433
#endif
3534

@@ -66,7 +65,6 @@ int event_notifier_init(EventNotifier *e, int active)
6665
e->rfd = fds[0];
6766
e->wfd = fds[1];
6867
}
69-
e->cleanup = NULL;
7068
if (active) {
7169
event_notifier_set(e);
7270
}
@@ -82,11 +80,10 @@ void event_notifier_cleanup(EventNotifier *e)
8280
{
8381
if (e->rfd != e->wfd) {
8482
close(e->rfd);
83+
e->rfd = -1;
8584
}
8685
close(e->wfd);
87-
e->rfd = -1;
8886
e->wfd = -1;
89-
e->cleanup = NULL;
9087
}
9188

9289
int event_notifier_get_fd(const EventNotifier *e)

‎util/event_notifier-win32.c

-2
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,13 @@ int event_notifier_init(EventNotifier *e, int active)
1919
{
2020
e->event = CreateEvent(NULL, TRUE, FALSE, NULL);
2121
assert(e->event);
22-
e->cleanup = NULL;
2322
return 0;
2423
}
2524

2625
void event_notifier_cleanup(EventNotifier *e)
2726
{
2827
CloseHandle(e->event);
2928
e->event = NULL;
30-
e->cleanup = NULL;
3129
}
3230

3331
HANDLE event_notifier_get_handle(EventNotifier *e)

0 commit comments

Comments
 (0)
Please sign in to comment.