@@ -56,6 +56,6 @@ bool vhost_user_server_start(VuServer *server,
void vhost_user_server_stop(VuServer *server);
-void vhost_user_server_set_aio_context(AioContext *ctx, VuServer *server);
+void vhost_user_server_set_aio_context(VuServer *server, AioContext *ctx);
#endif /* VHOST_USER_SERVER_H */
@@ -356,7 +356,7 @@ static void attach_context(VuServer *server, AioContext *ctx)
}
}
-void vhost_user_server_set_aio_context(AioContext *ctx, VuServer *server)
+void vhost_user_server_set_aio_context(VuServer *server, AioContext *ctx)
{
server->ctx = ctx ? ctx : qemu_get_aio_context();
if (!server->sioc) {
vhost_user_server_set_aio_context() operates on a VuServer object. Make that the first argument of the function since it is conventional to define functions with the object they act on as the first argument. In other words, obj_action(obj, args...) is commonly used and not obj_action(arg1, ..., obj, ...). Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> --- util/vhost-user-server.h | 2 +- util/vhost-user-server.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)