ia64/xen-unstable

view tools/libxc/xc_sedf.c @ 6946:e703abaf6e3d

Add behaviour to the remove methods to remove the transaction's path itself. This allows us to write Remove(path) to remove the specified path rather than having to slice the path ourselves.
author emellor@ewan
date Sun Sep 18 14:42:13 2005 +0100 (2005-09-18)
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 }