mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
aio: remove aio_disable_external() API
All callers now pass is_external=false to aio_set_fd_handler() and aio_set_event_notifier(). The aio_disable_external() API that temporarily disables fd handlers that were registered is_external=true is therefore dead code. Remove aio_disable_external(), aio_enable_external(), and the is_external arguments to aio_set_fd_handler() and aio_set_event_notifier(). The entire test-fdmon-epoll test is removed because its sole purpose was testing aio_disable_external(). Parts of this patch were generated using the following coccinelle (https://coccinelle.lip6.fr/) semantic patch: @@ expression ctx, fd, is_external, io_read, io_write, io_poll, io_poll_ready, opaque; @@ - aio_set_fd_handler(ctx, fd, is_external, io_read, io_write, io_poll, io_poll_ready, opaque) + aio_set_fd_handler(ctx, fd, io_read, io_write, io_poll, io_poll_ready, opaque) @@ expression ctx, notifier, is_external, io_read, io_poll, io_poll_ready; @@ - aio_set_event_notifier(ctx, notifier, is_external, io_read, io_poll, io_poll_ready) + aio_set_event_notifier(ctx, notifier, io_read, io_poll, io_poll_ready) Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20230516190238.8401-21-stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
03d7162a21
commit
60f782b6b7
36 changed files with 80 additions and 298 deletions
|
@ -842,14 +842,14 @@ void xen_device_set_event_channel_context(XenDevice *xendev,
|
|||
}
|
||||
|
||||
if (channel->ctx)
|
||||
aio_set_fd_handler(channel->ctx, qemu_xen_evtchn_fd(channel->xeh), false,
|
||||
aio_set_fd_handler(channel->ctx, qemu_xen_evtchn_fd(channel->xeh),
|
||||
NULL, NULL, NULL, NULL, NULL);
|
||||
|
||||
channel->ctx = ctx;
|
||||
if (ctx) {
|
||||
aio_set_fd_handler(channel->ctx, qemu_xen_evtchn_fd(channel->xeh),
|
||||
false, xen_device_event, NULL, xen_device_poll,
|
||||
NULL, channel);
|
||||
xen_device_event, NULL, xen_device_poll, NULL,
|
||||
channel);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -923,7 +923,7 @@ void xen_device_unbind_event_channel(XenDevice *xendev,
|
|||
|
||||
QLIST_REMOVE(channel, list);
|
||||
|
||||
aio_set_fd_handler(channel->ctx, qemu_xen_evtchn_fd(channel->xeh), false,
|
||||
aio_set_fd_handler(channel->ctx, qemu_xen_evtchn_fd(channel->xeh),
|
||||
NULL, NULL, NULL, NULL, NULL);
|
||||
|
||||
if (qemu_xen_evtchn_unbind(channel->xeh, channel->local_port) < 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue