aboutsummaryrefslogtreecommitdiff
path: root/event_notifier.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2010-05-24 17:26:13 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2012-10-30 09:30:52 +0100
commitfc97a652de3e54394ca4d0e5e5d689fd8aba8b6f (patch)
treeabc10b33720d40562dad13a534e5702075a6de59 /event_notifier.h
parent136594f19aa6370e77a50bd9bba5db77def6ec8f (diff)
event_notifier: add Win32 implementation
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'event_notifier.h')
-rw-r--r--event_notifier.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/event_notifier.h b/event_notifier.h
index f0ec2f2171..b283a497ce 100644
--- a/event_notifier.h
+++ b/event_notifier.h
@@ -15,18 +15,31 @@
#include "qemu-common.h"
+#ifdef _WIN32
+#include <windows.h>
+#endif
+
struct EventNotifier {
+#ifdef _WIN32
+ HANDLE event;
+#else
int fd;
+#endif
};
typedef void EventNotifierHandler(EventNotifier *);
-void event_notifier_init_fd(EventNotifier *, int fd);
int event_notifier_init(EventNotifier *, int active);
void event_notifier_cleanup(EventNotifier *);
-int event_notifier_get_fd(EventNotifier *);
int event_notifier_set(EventNotifier *);
int event_notifier_test_and_clear(EventNotifier *);
int event_notifier_set_handler(EventNotifier *, EventNotifierHandler *);
+#ifdef CONFIG_POSIX
+void event_notifier_init_fd(EventNotifier *, int fd);
+int event_notifier_get_fd(EventNotifier *);
+#else
+HANDLE event_notifier_get_handle(EventNotifier *);
+#endif
+
#endif