event-notifier: Add "is_external" parameter

All callers pass "false" keeping the old semantics. The windows
implementation doesn't distinguish the flag yet. On posix, it is passed
down to the underlying aio context.

Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Fam Zheng 2016-04-22 21:53:53 +08:00 committed by Kevin Wolf
parent bcd82a968f
commit 54e18d35e4
7 changed files with 25 additions and 10 deletions

View file

@ -91,9 +91,11 @@ int event_notifier_get_fd(const EventNotifier *e)
}
int event_notifier_set_handler(EventNotifier *e,
bool is_external,
EventNotifierHandler *handler)
{
qemu_set_fd_handler(e->rfd, (IOHandler *)handler, NULL, e);
aio_set_fd_handler(iohandler_get_aio_context(), e->rfd, is_external,
(IOHandler *)handler, NULL, e);
return 0;
}