ia64/xen-unstable

view tools/libxc/xc_tbuf.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_tbuf.c
3 *
4 * API for manipulating and accessing trace buffer parameters
5 *
6 * Copyright (c) 2005, Rob Gardner
7 */
9 #include "xc_private.h"
11 int xc_tbuf_enable(int xc_handle, int enable)
12 {
13 DECLARE_DOM0_OP;
15 op.cmd = DOM0_TBUFCONTROL;
16 op.interface_version = DOM0_INTERFACE_VERSION;
17 if (enable)
18 op.u.tbufcontrol.op = DOM0_TBUF_ENABLE;
19 else
20 op.u.tbufcontrol.op = DOM0_TBUF_DISABLE;
22 return xc_dom0_op(xc_handle, &op);
23 }
25 int xc_tbuf_set_size(int xc_handle, uint32_t size)
26 {
27 DECLARE_DOM0_OP;
29 op.cmd = DOM0_TBUFCONTROL;
30 op.interface_version = DOM0_INTERFACE_VERSION;
31 op.u.tbufcontrol.op = DOM0_TBUF_SET_SIZE;
32 op.u.tbufcontrol.size = size;
34 return xc_dom0_op(xc_handle, &op);
35 }
37 int xc_tbuf_get_size(int xc_handle, uint32_t *size)
38 {
39 int rc;
40 DECLARE_DOM0_OP;
42 op.cmd = DOM0_TBUFCONTROL;
43 op.interface_version = DOM0_INTERFACE_VERSION;
44 op.u.tbufcontrol.op = DOM0_TBUF_GET_INFO;
46 rc = xc_dom0_op(xc_handle, &op);
47 if (rc == 0)
48 *size = op.u.tbufcontrol.size;
49 return rc;
50 }