From d6da1e9eca939e8f9d41639be17c4bf5af7d5625 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 10 Jan 2017 11:54:52 +0100 Subject: event_notifier: cleanups around event_notifier_set_handler Remove the useless is_external argument. Since the iohandler AioContext is never used for block devices, aio_disable_external is never called on it. This lets us remove stubs/iohandler.c. Signed-off-by: Paolo Bonzini --- include/qemu/event_notifier.h | 3 --- include/qemu/main-loop.h | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/qemu/event_notifier.h b/include/qemu/event_notifier.h index e326990db4..599c99f1a5 100644 --- a/include/qemu/event_notifier.h +++ b/include/qemu/event_notifier.h @@ -34,9 +34,6 @@ int event_notifier_init(EventNotifier *, int active); void event_notifier_cleanup(EventNotifier *); int event_notifier_set(EventNotifier *); int event_notifier_test_and_clear(EventNotifier *); -int event_notifier_set_handler(EventNotifier *, - bool is_external, - EventNotifierHandler *); #ifdef CONFIG_POSIX void event_notifier_init_fd(EventNotifier *, int fd); diff --git a/include/qemu/main-loop.h b/include/qemu/main-loop.h index a9d4f23cd9..d7e24af78d 100644 --- a/include/qemu/main-loop.h +++ b/include/qemu/main-loop.h @@ -203,6 +203,21 @@ void qemu_set_fd_handler(int fd, IOHandler *fd_write, void *opaque); + +/** + * event_notifier_set_handler: Register an EventNotifier with the main loop + * + * This function tells the main loop to wake up whenever the + * #EventNotifier was set. + * + * @e: The #EventNotifier to be observed. + * + * @handler: A level-triggered callback that is fired when @e + * has been set. @e is passed to it as a parameter. + */ +void event_notifier_set_handler(EventNotifier *e, + EventNotifierHandler *handler); + GSource *iohandler_get_g_source(void); AioContext *iohandler_get_aio_context(void); #ifdef CONFIG_POSIX -- cgit v1.2.3