ia64/xen-unstable

view tools/libxc/xc_sedf.c @ 6385:f34e732ed4bf

Xenstore testsuite robustness: save output rather than rerun on failure.
"make check" reruns a test which fails with more verbosity. If the test
fails intermittently, that doesn't work well: save the output and simply
dump it if the test fails.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Tue Aug 23 19:58:59 2005 +0000 (2005-08-23)
parents ddd290cc8f0d
children b3a255e88810
line source
1 /******************************************************************************
2 * xc_sedf.c
3 *
4 * API for manipulating parameters of the Simple EDF scheduler.
5 *
6 * changes by Stephan Diestelhorst
7 * based on code
8 * by Mark Williamson, Copyright (c) 2004 Intel Research Cambridge.
9 */
11 #include "xc_private.h"
13 int xc_sedf_domain_set(int xc_handle,
14 u32 domid, u64 period, u64 slice,u64 latency, u16 extratime,u16 weight)
15 {
16 dom0_op_t op;
17 struct sedf_adjdom *p = &op.u.adjustdom.u.sedf;
19 op.cmd = DOM0_ADJUSTDOM;
20 op.u.adjustdom.domain = (domid_t)domid;
21 op.u.adjustdom.sched_id = SCHED_SEDF;
22 op.u.adjustdom.direction = SCHED_INFO_PUT;
24 p->period = period;
25 p->slice = slice;
26 p->latency = latency;
27 p->extratime = extratime;
28 p->weight = weight;
29 return do_dom0_op(xc_handle, &op);
30 }
32 int xc_sedf_domain_get(int xc_handle, u32 domid, u64 *period, u64 *slice, u64* latency, u16* extratime, u16* weight)
33 {
34 dom0_op_t op;
35 int ret;
36 struct sedf_adjdom *p = &op.u.adjustdom.u.sedf;
38 op.cmd = DOM0_ADJUSTDOM;
39 op.u.adjustdom.domain = (domid_t)domid;
40 op.u.adjustdom.sched_id = SCHED_SEDF;
41 op.u.adjustdom.direction = SCHED_INFO_GET;
43 ret = do_dom0_op(xc_handle, &op);
45 *period = p->period;
46 *slice = p->slice;
47 *latency = p->latency;
48 *extratime = p->extratime;
49 *weight = p->weight;
50 return ret;
51 }