mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
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 <pbonzini@redhat.com>
This commit is contained in:
parent
a0f80010b3
commit
d6da1e9eca
10 changed files with 33 additions and 42 deletions
|
@ -2090,10 +2090,10 @@ void virtio_queue_set_guest_notifier_fd_handler(VirtQueue *vq, bool assign,
|
|||
bool with_irqfd)
|
||||
{
|
||||
if (assign && !with_irqfd) {
|
||||
event_notifier_set_handler(&vq->guest_notifier, false,
|
||||
event_notifier_set_handler(&vq->guest_notifier,
|
||||
virtio_queue_guest_notifier_read);
|
||||
} else {
|
||||
event_notifier_set_handler(&vq->guest_notifier, false, NULL);
|
||||
event_notifier_set_handler(&vq->guest_notifier, NULL);
|
||||
}
|
||||
if (!assign) {
|
||||
/* Test and clear notifier before closing it,
|
||||
|
@ -2262,7 +2262,7 @@ static int virtio_device_start_ioeventfd_impl(VirtIODevice *vdev)
|
|||
err = r;
|
||||
goto assign_error;
|
||||
}
|
||||
event_notifier_set_handler(&vq->host_notifier, true,
|
||||
event_notifier_set_handler(&vq->host_notifier,
|
||||
virtio_queue_host_notifier_read);
|
||||
}
|
||||
|
||||
|
@ -2283,7 +2283,7 @@ assign_error:
|
|||
continue;
|
||||
}
|
||||
|
||||
event_notifier_set_handler(&vq->host_notifier, true, NULL);
|
||||
event_notifier_set_handler(&vq->host_notifier, NULL);
|
||||
r = virtio_bus_set_host_notifier(qbus, n, false);
|
||||
assert(r >= 0);
|
||||
}
|
||||
|
@ -2309,7 +2309,7 @@ static void virtio_device_stop_ioeventfd_impl(VirtIODevice *vdev)
|
|||
if (!virtio_queue_get_num(vdev, n)) {
|
||||
continue;
|
||||
}
|
||||
event_notifier_set_handler(&vq->host_notifier, true, NULL);
|
||||
event_notifier_set_handler(&vq->host_notifier, NULL);
|
||||
r = virtio_bus_set_host_notifier(qbus, n, false);
|
||||
assert(r >= 0);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue