aboutsummaryrefslogtreecommitdiff
path: root/event_notifier.c
diff options
context:
space:
mode:
Diffstat (limited to 'event_notifier.c')
-rw-r--r--event_notifier.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/event_notifier.c b/event_notifier.c
index 99c376c6a3..2c207e1399 100644
--- a/event_notifier.c
+++ b/event_notifier.c
@@ -12,6 +12,7 @@
#include "qemu-common.h"
#include "event_notifier.h"
+#include "qemu-char.h"
#ifdef CONFIG_EVENTFD
#include <sys/eventfd.h>
@@ -45,6 +46,12 @@ int event_notifier_get_fd(EventNotifier *e)
return e->fd;
}
+int event_notifier_set_handler(EventNotifier *e,
+ EventNotifierHandler *handler)
+{
+ return qemu_set_fd_handler(e->fd, (IOHandler *)handler, NULL, e);
+}
+
int event_notifier_set(EventNotifier *e)
{
uint64_t value = 1;