From 2292b33986de9e2ac10b2674f85722bdfbc977d5 Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Wed, 17 Mar 2010 13:07:58 +0200 Subject: notifier: event notifier implementation event notifiers are slightly generalized eventfd descriptors. Current implementation depends on eventfd because vhost is the only user, and vhost depends on eventfd anyway, but a stub is provided for non-eventfd case. We'll be able to further generalize this when another user comes along and we see how to best do this. Signed-off-by: Michael S. Tsirkin Signed-off-by: Anthony Liguori --- hw/event_notifier.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 hw/event_notifier.h (limited to 'hw/event_notifier.h') diff --git a/hw/event_notifier.h b/hw/event_notifier.h new file mode 100644 index 0000000000..24117ea97b --- /dev/null +++ b/hw/event_notifier.h @@ -0,0 +1,16 @@ +#ifndef QEMU_EVENT_NOTIFIER_H +#define QEMU_EVENT_NOTIFIER_H + +#include "qemu-common.h" + +struct EventNotifier { + int fd; +}; + +int event_notifier_init(EventNotifier *, int active); +void event_notifier_cleanup(EventNotifier *); +int event_notifier_get_fd(EventNotifier *); +int event_notifier_test_and_clear(EventNotifier *); +int event_notifier_test(EventNotifier *); + +#endif -- cgit v1.2.3