ia64/xen-unstable

view tools/libxc/xc_rrobin.c @ 1820:3d4f8eb89670

bitkeeper revision 1.1106.1.2 (40faa780dekT3E5arFwcbQDu1MbX6g)

Cleaned up Xen's instruction emulator.
author kaf24@scramble.cl.cam.ac.uk
date Sun Jul 18 16:38:24 2004 +0000 (2004-07-18)
parents 236a9f2698a3
children
line source
1 /******************************************************************************
2 * xc_rrobin.c
3 *
4 * API for manipulating parameters of the Round Robin scheduler
5 *
6 * by Mark Williamson, Copyright (c) 2004 Intel Research Cambridge.
7 */
9 #include "xc_private.h"
11 int xc_rrobin_global_set(int xc_handle, u64 slice)
12 {
13 dom0_op_t op;
14 op.cmd = DOM0_SCHEDCTL;
15 op.u.schedctl.sched_id = SCHED_RROBIN;
16 op.u.schedctl.direction = SCHED_INFO_PUT;
18 op.u.schedctl.u.rrobin.slice = slice;
19 return do_dom0_op(xc_handle, &op);
20 }
23 int xc_rrobin_global_get(int xc_handle, u64 *slice)
24 {
25 dom0_op_t op;
26 int ret;
28 op.cmd = DOM0_SCHEDCTL;
29 op.u.schedctl.sched_id = SCHED_RROBIN;
30 op.u.schedctl.direction = SCHED_INFO_GET;
32 ret = do_dom0_op(xc_handle, &op);
34 *slice = op.u.schedctl.u.rrobin.slice;
36 return ret;
37 }