ia64/xen-unstable

view tools/libxc/xc_atropos.c @ 1921:24ecc060e9d7

bitkeeper revision 1.1108.21.1 (41062740xHG36OEbpVAmVX5N9WCaNw)

make vmlinuz really stripped
author cl349@freefall.cl.cam.ac.uk
date Tue Jul 27 09:58:24 2004 +0000 (2004-07-27)
parents 236a9f2698a3
children
line source
1 /******************************************************************************
2 * xc_atropos.c
3 *
4 * API for manipulating parameters of the Atropos scheduler.
5 *
6 * by Mark Williamson, Copyright (c) 2004 Intel Research Cambridge.
7 */
9 #include "xc_private.h"
11 int xc_atropos_domain_set(int xc_handle,
12 u32 domid, u64 period, u64 slice, u64 latency,
13 int xtratime)
14 {
15 dom0_op_t op;
16 struct atropos_adjdom *p = &op.u.adjustdom.u.atropos;
18 op.cmd = DOM0_ADJUSTDOM;
19 op.u.adjustdom.domain = (domid_t)domid;
20 op.u.adjustdom.sched_id = SCHED_ATROPOS;
21 op.u.adjustdom.direction = SCHED_INFO_PUT;
23 p->nat_period = period;
24 p->nat_slice = slice;
25 p->latency = latency;
26 p->xtratime = xtratime;
28 return do_dom0_op(xc_handle, &op);
29 }
31 int xc_atropos_domain_get(int xc_handle, u32 domid, u64 *period,
32 u64 *slice, u64 *latency, int *xtratime)
33 {
34 dom0_op_t op;
35 int ret;
36 struct atropos_adjdom *p = &op.u.adjustdom.u.atropos;
38 op.cmd = DOM0_ADJUSTDOM;
39 op.u.adjustdom.domain = (domid_t)domid;
40 op.u.adjustdom.sched_id = SCHED_ATROPOS;
41 op.u.adjustdom.direction = SCHED_INFO_GET;
43 ret = do_dom0_op(xc_handle, &op);
45 *period = p->nat_period;
46 *slice = p->nat_slice;
47 *latency = p->latency;
48 *xtratime = p->xtratime;
50 return ret;
51 }