ia64/xen-unstable

view extras/mini-os/h/events.h @ 4146:f2d61710e4d9

bitkeeper revision 1.1236.25.24 (42366e9aQ71LQ8uCB-Y1IwVNqx5eqA)

Merge djm@kirby.fc.hp.com://home/djm/src/xen/xeno-unstable-ia64.bk
into sportsman.spdomain:/home/djm/xeno-unstable-ia64.bk
author djm@sportsman.spdomain
date Tue Mar 15 05:11:54 2005 +0000 (2005-03-15)
parents 0a4b76b6b5a0
children
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 xen-public/xen.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_ */