ia64/xen-unstable

view extras/mini-os/h/events.h @ 1510:50ebf96e89bf

bitkeeper revision 1.987 (40d595643wZIEtMwb3hHvNEGMAu8gQ)

Fix the getdomaininfo dom0_op.
author kaf24@scramble.cl.cam.ac.uk
date Sun Jun 20 13:47:16 2004 +0000 (2004-06-20)
parents 34473973889b
children b914ff7d73b5 3f929065a1d1 0a4b76b6b5a0
line source
1 /* -*- Mode:C; c-basic-offset:4; tab-width:4 -*-
2 ****************************************************************************
3 * (C) 2003 - Rolf Neugebauer - Intel Research Cambridge
4 ****************************************************************************
5 *
6 * File: events.h
7 * Author: Rolf Neugebauer (neugebar@dcs.gla.ac.uk)
8 * Changes:
9 *
10 * Date: Jul 2003
11 *
12 * Environment: Xen Minimal OS
13 * Description: deal with events
14 *
15 ****************************************************************************
16 * $Id: h-insert.h,v 1.4 2002/11/08 16:03:55 rn Exp $
17 ****************************************************************************
18 */
20 #ifndef _EVENTS_H_
21 #define _EVENTS_H_
23 /* _EVENT_* are defined in hypervisor-if.h */
24 #define EV_BLKDEV _EVENT_BLKDEV
25 #define EV_TIMER _EVENT_TIMER
26 #define EV_DIE _EVENT_DIE
27 #define EV_DEBUG _EVENT_DEBUG
28 #define EV_NET _EVENT_NET
29 #define EV_PS2 _EVENT_PS2
31 #define NR_EVS (sizeof(HYPERVISOR_shared_info->events) * 8)
33 /* ev handler status */
34 #define EVS_INPROGRESS 1 /* Event handler active - do not enter! */
35 #define EVS_DISABLED 2 /* Event disabled - do not enter! */
36 #define EVS_PENDING 4 /* Event pending - replay on enable */
37 #define EVS_REPLAY 8 /* Event has been replayed but not acked yet */
39 /* this represents a event handler. Chaining or sharing is not allowed */
40 typedef struct _ev_action_t {
41 void (*handler)(int, struct pt_regs *);
42 unsigned int status; /* IRQ status */
43 u32 count;
44 } ev_action_t;
46 /* prototypes */
47 unsigned int do_event(int ev, struct pt_regs *regs);
48 unsigned int add_ev_action( int ev, void (*handler)(int, struct pt_regs *) );
49 unsigned int enable_ev_action( int ev );
50 unsigned int disable_ev_action( int ev );
51 void init_events(void);
53 #endif /* _EVENTS_H_ */