diff options
author | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2005-07-06 10:46:29 +0000 |
---|---|---|
committer | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2005-07-06 10:46:29 +0000 |
commit | b7d34829a343a9fcc9e5d6a64d6138bc6ce0d160 (patch) | |
tree | 55fdbbc8a6878bbfcbc00826dce1138f17d721e2 /extras/mini-os/include/events.h | |
parent | 3f54e6d5ece9b20caa0fd77d2c8342c69c6733b2 (diff) | |
download | xen-b7d34829a343a9fcc9e5d6a64d6138bc6ce0d160.tar.gz xen-b7d34829a343a9fcc9e5d6a64d6138bc6ce0d160.tar.bz2 xen-b7d34829a343a9fcc9e5d6a64d6138bc6ce0d160.zip |
Mini-os updates from Grzegorz Milos.
Diffstat (limited to 'extras/mini-os/include/events.h')
-rw-r--r-- | extras/mini-os/include/events.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/extras/mini-os/include/events.h b/extras/mini-os/include/events.h new file mode 100644 index 0000000000..7825650c57 --- /dev/null +++ b/extras/mini-os/include/events.h @@ -0,0 +1,44 @@ +/* -*- Mode:C; c-basic-offset:4; tab-width:4 -*- + **************************************************************************** + * (C) 2003 - Rolf Neugebauer - Intel Research Cambridge + * (C) 2005 - Grzegorz Milos - Intel Reseach Cambridge + **************************************************************************** + * + * File: events.h + * Author: Rolf Neugebauer (neugebar@dcs.gla.ac.uk) + * Changes: Grzegorz Milos (gm281@cam.ac.uk) + * + * Date: Jul 2003, changes Jun 2005 + * + * Environment: Xen Minimal OS + * Description: Deals with events on the event channels + * + **************************************************************************** + */ + +#ifndef _EVENTS_H_ +#define _EVENTS_H_ + +#include<traps.h> + +#define NR_EVS 1024 + +/* ev handler status */ +#define EVS_INPROGRESS 1 /* Event handler active - do not enter! */ +#define EVS_DISABLED 2 /* Event disabled - do not enter! */ +#define EVS_PENDING 4 /* Event pending - replay on enable */ +#define EVS_REPLAY 8 /* Event has been replayed but not acked yet */ + +/* this represents a event handler. Chaining or sharing is not allowed */ +typedef struct _ev_action_t { + void (*handler)(int, struct pt_regs *); + unsigned int status; /* IRQ status */ + u32 count; +} ev_action_t; + +/* prototypes */ +int do_event(u32 port, struct pt_regs *regs); +int bind_virq( u32 virq, void (*handler)(int, struct pt_regs *) ); +void init_events(void); + +#endif /* _EVENTS_H_ */ |