提交 667cce7b 编写于 作者: J Jiri Denemark

Set thread job for every RPC call

Since all APIs are also RPC calls, we automatically get all APIs covered
with thread jobs.
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
上级 d20f5dde
......@@ -51,6 +51,7 @@
#include "viraccessapicheck.h"
#include "viraccessapicheckqemu.h"
#include "virpolkit.h"
#include "virthreadjob.h"
#define VIR_FROM_THIS VIR_FROM_RPC
......
......@@ -29,6 +29,7 @@
#include "lock_daemon.h"
#include "lock_protocol.h"
#include "virerror.h"
#include "virthreadjob.h"
#define VIR_FROM_THIS VIR_FROM_RPC
......
......@@ -39,6 +39,7 @@
#include "virtime.h"
#include "virstoragefile.h"
#include "virstring.h"
#include "virthreadjob.h"
#include "storage/storage_driver.h"
......
......@@ -428,8 +428,10 @@ elsif ($mode eq "server") {
print " void *args$argann,\n";
print " void *ret$retann)\n";
print "{\n";
print " int rv;\n";
print " virThreadJobSet(\"$name\");\n";
print " VIR_DEBUG(\"server=%p client=%p msg=%p rerr=%p args=%p ret=%p\", server, client, msg, rerr, args, ret);\n";
print " return $name(server, client, msg, rerr";
print " rv = $name(server, client, msg, rerr";
if ($argtype ne "void") {
print ", args";
}
......@@ -437,6 +439,8 @@ elsif ($mode eq "server") {
print ", ret";
}
print ");\n";
print " virThreadJobClear(rv);\n";
print " return rv;\n";
print "}\n";
# Finally we print out the dispatcher method body impl
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册