ia64/xen-unstable

view tools/libxc/xc_sedf.c @ 8964:8946b6dcd49e

Fix x86_64 Xen build.

event_callback_cs and failsafe_callback_cs are x86_32 only.

Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
author Ian.Campbell@xensource.com
date Wed Feb 22 17:26:39 2006 +0000 (2006-02-22)
parents 602aefe7bd48
children 74ee53209cca
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 uint32_t domid, uint64_t period, uint64_t slice,uint64_t latency, uint16_t extratime,uint16_t weight)
15 {
16 DECLARE_DOM0_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, uint32_t domid, uint64_t *period, uint64_t *slice, uint64_t* latency, uint16_t* extratime, uint16_t* weight)
33 {
34 DECLARE_DOM0_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 }