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: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
Jiri Denemark 2015-03-11 13:58:42 +01:00
parent d20f5dde29
commit 667cce7b60
4 changed files with 8 additions and 1 deletions

View File

@ -51,6 +51,7 @@
#include "viraccessapicheck.h" #include "viraccessapicheck.h"
#include "viraccessapicheckqemu.h" #include "viraccessapicheckqemu.h"
#include "virpolkit.h" #include "virpolkit.h"
#include "virthreadjob.h"
#define VIR_FROM_THIS VIR_FROM_RPC #define VIR_FROM_THIS VIR_FROM_RPC

View File

@ -29,6 +29,7 @@
#include "lock_daemon.h" #include "lock_daemon.h"
#include "lock_protocol.h" #include "lock_protocol.h"
#include "virerror.h" #include "virerror.h"
#include "virthreadjob.h"
#define VIR_FROM_THIS VIR_FROM_RPC #define VIR_FROM_THIS VIR_FROM_RPC

View File

@ -39,6 +39,7 @@
#include "virtime.h" #include "virtime.h"
#include "virstoragefile.h" #include "virstoragefile.h"
#include "virstring.h" #include "virstring.h"
#include "virthreadjob.h"
#include "storage/storage_driver.h" #include "storage/storage_driver.h"

View File

@ -428,8 +428,10 @@ elsif ($mode eq "server") {
print " void *args$argann,\n"; print " void *args$argann,\n";
print " void *ret$retann)\n"; print " void *ret$retann)\n";
print "{\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 " 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") { if ($argtype ne "void") {
print ", args"; print ", args";
} }
@ -437,6 +439,8 @@ elsif ($mode eq "server") {
print ", ret"; print ", ret";
} }
print ");\n"; print ");\n";
print " virThreadJobClear(rv);\n";
print " return rv;\n";
print "}\n"; print "}\n";
# Finally we print out the dispatcher method body impl # Finally we print out the dispatcher method body impl