@@ -69,7 +69,7 @@ void event_poll_modify_fd(EventPoll *poll, int fd, uint32_t type,
}
/* Event callback for stopping event_poll() */
-static void handle_stop(EventHandler *handler)
+static void handle_stop(EventHandler *handler, uint32_t events)
{
/* Do nothing */
}
@@ -123,7 +123,7 @@ void event_poll(EventPoll *poll)
event_notifier_test_and_clear(handler->notifier);
/* Handle the event */
- handler->callback(handler);
+ handler->callback(handler, event.events);
}
/* Stop event_poll()
@@ -18,7 +18,7 @@
#include "qemu/event_notifier.h"
typedef struct EventHandler EventHandler;
-typedef void EventCallback(EventHandler *handler);
+typedef void EventCallback(EventHandler *handler, uint32_t events);
struct EventHandler {
EventNotifier *notifier; /* eventfd */
EventCallback *callback; /* callback function */
@@ -206,7 +206,7 @@ static int process_request(IOQueue *ioq, struct iovec iov[],
return 0;
}
-static void handle_notify(EventHandler *handler)
+static void handle_notify(EventHandler *handler, uint32_t type)
{
VirtIOBlockDataPlane *s = container_of(handler, VirtIOBlockDataPlane,
notify_handler);
@@ -284,7 +284,7 @@ static void handle_notify(EventHandler *handler)
}
}
-static void handle_io(EventHandler *handler)
+static void handle_io(EventHandler *handler, uint32_t type)
{
VirtIOBlockDataPlane *s = container_of(handler, VirtIOBlockDataPlane,
io_handler);
@@ -298,7 +298,7 @@ static void handle_io(EventHandler *handler)
* requests.
*/
if (unlikely(vring_more_avail(&s->vring))) {
- handle_notify(&s->notify_handler);
+ handle_notify(&s->notify_handler, type);
}
}