mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 11:35:19 +00:00
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:
parent
d20f5dde29
commit
667cce7b60
@ -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
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -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"
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user