qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 3/6] vhost-user-server: adjust vhost_user_server_set_aio_context(


From: Stefan Hajnoczi
Subject: [PATCH 3/6] vhost-user-server: adjust vhost_user_server_set_aio_context() arguments
Date: Fri, 19 Jun 2020 13:00:43 +0100

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(-)

diff --git a/util/vhost-user-server.h b/util/vhost-user-server.h
index 5baf58f96a..584aab3da5 100644
--- a/util/vhost-user-server.h
+++ b/util/vhost-user-server.h
@@ -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 */
diff --git a/util/vhost-user-server.c b/util/vhost-user-server.c
index 49ada8bc78..5230ba3883 100644
--- a/util/vhost-user-server.c
+++ b/util/vhost-user-server.c
@@ -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) {
-- 
2.26.2


reply via email to

[Prev in Thread] Current Thread [Next in Thread]