aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xc_sedf.c
diff options
context:
space:
mode:
authoremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>2005-11-22 16:31:16 +0100
committeremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>2005-11-22 16:31:16 +0100
commita22292f2bb59bda113d820fa7da5629408fac98d (patch)
treec5e423a69d01967f816f3d6dc761bff77e53bcce /tools/libxc/xc_sedf.c
parent10edfe8abf0512c380bc2bb4d79af9460558f815 (diff)
downloadxen-a22292f2bb59bda113d820fa7da5629408fac98d.tar.gz
xen-a22292f2bb59bda113d820fa7da5629408fac98d.tar.bz2
xen-a22292f2bb59bda113d820fa7da5629408fac98d.zip
Make it possible to run valgrind on code linked with the libxc libraries.
Valgrind cannot see when a hypercall has initialised entries in a data structure, so appropriate memsets have been placed before using dom0_op_t, privcmd_hypercall_t, and a couple of miscellaneous blocks passed into this layer. This initialises the block so that valgrind considers it to be valid, but the data therein will be immediately overwritten by the hypercall, all being well. These changes are semantically neutral if -DVALGRIND is not set. Signed-off-by: Ewan Mellor <ewan@xensource.com>
Diffstat (limited to 'tools/libxc/xc_sedf.c')
-rw-r--r--tools/libxc/xc_sedf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/libxc/xc_sedf.c b/tools/libxc/xc_sedf.c
index 64984afa12..34216ed97e 100644
--- a/tools/libxc/xc_sedf.c
+++ b/tools/libxc/xc_sedf.c
@@ -13,7 +13,7 @@
int xc_sedf_domain_set(int xc_handle,
uint32_t domid, uint64_t period, uint64_t slice,uint64_t latency, uint16_t extratime,uint16_t weight)
{
- dom0_op_t op;
+ DECLARE_DOM0_OP;
struct sedf_adjdom *p = &op.u.adjustdom.u.sedf;
op.cmd = DOM0_ADJUSTDOM;
@@ -31,7 +31,7 @@ int xc_sedf_domain_set(int xc_handle,
int xc_sedf_domain_get(int xc_handle, uint32_t domid, uint64_t *period, uint64_t *slice, uint64_t* latency, uint16_t* extratime, uint16_t* weight)
{
- dom0_op_t op;
+ DECLARE_DOM0_OP;
int ret;
struct sedf_adjdom *p = &op.u.adjustdom.u.sedf;