ia64/xen-unstable

view extras/mini-os/include/events.h @ 5688:d231efdaa66d

manual merge
author iap10@freefall.cl.cam.ac.uk
date Wed Jul 06 18:55:16 2005 +0000 (2005-07-06)
parents 189c87adf876 43e8e30cbea7
children 32fb371cc283 707fcf42a5ae
line source
1 /* -*- Mode:C; c-basic-offset:4; tab-width:4 -*-
2 ****************************************************************************
3 * (C) 2003 - Rolf Neugebauer - Intel Research Cambridge
4 * (C) 2005 - Grzegorz Milos - Intel Reseach Cambridge
5 ****************************************************************************
6 *
7 * File: events.h
8 * Author: Rolf Neugebauer (neugebar@dcs.gla.ac.uk)
9 * Changes: Grzegorz Milos (gm281@cam.ac.uk)
10 *
11 * Date: Jul 2003, changes Jun 2005
12 *
13 * Environment: Xen Minimal OS
14 * Description: Deals with events on the event channels
15 *
16 ****************************************************************************
17 */
19 #ifndef _EVENTS_H_
20 #define _EVENTS_H_
22 #include<traps.h>
24 #define NR_EVS 1024
26 /* ev handler status */
27 #define EVS_INPROGRESS 1 /* Event handler active - do not enter! */
28 #define EVS_DISABLED 2 /* Event disabled - do not enter! */
29 #define EVS_PENDING 4 /* Event pending - replay on enable */
30 #define EVS_REPLAY 8 /* Event has been replayed but not acked yet */
32 /* this represents a event handler. Chaining or sharing is not allowed */
33 typedef struct _ev_action_t {
34 void (*handler)(int, struct pt_regs *);
35 unsigned int status; /* IRQ status */
36 u32 count;
37 } ev_action_t;
39 /* prototypes */
40 int do_event(u32 port, struct pt_regs *regs);
41 int bind_virq( u32 virq, void (*handler)(int, struct pt_regs *) );
42 void init_events(void);
44 #endif /* _EVENTS_H_ */