diff options
author | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2006-07-05 11:27:58 +0100 |
---|---|---|
committer | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2006-07-05 11:27:58 +0100 |
commit | 79700a5ce7f1aec65cf219fd53c9532fdd1d2188 (patch) | |
tree | b78a2a29817aa65269f822a8deea407c9a7bb475 /extras/mini-os/include/events.h | |
parent | c5f5756de82e6b64d956a85d7b5a8e629b623083 (diff) | |
download | xen-79700a5ce7f1aec65cf219fd53c9532fdd1d2188.tar.gz xen-79700a5ce7f1aec65cf219fd53c9532fdd1d2188.tar.bz2 xen-79700a5ce7f1aec65cf219fd53c9532fdd1d2188.zip |
[MINIOS]Events handling cleaned up. The interface extended to provide
void* pointer to handlers.
Signed-off-by: Steven Smith <sos22@cam.ac.uk>
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
Diffstat (limited to 'extras/mini-os/include/events.h')
-rw-r--r-- | extras/mini-os/include/events.h | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/extras/mini-os/include/events.h b/extras/mini-os/include/events.h index c4e7c67fd8..c1b58c4db0 100644 --- a/extras/mini-os/include/events.h +++ b/extras/mini-os/include/events.h @@ -22,28 +22,18 @@ #include<traps.h> #include <xen/event_channel.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 *) ); -int bind_evtchn( u32 virq, void (*handler)(int, struct pt_regs *) ); +int bind_virq( u32 virq, void (*handler)(int, struct pt_regs *, void *data), + void *data); +int bind_evtchn( u32 virq, void (*handler)(int, struct pt_regs *, void *data), + void *data ); void unbind_evtchn( u32 port ); void init_events(void); void unbind_virq( u32 port ); +int evtchn_alloc_unbound(void (*handler)(int, struct pt_regs *regs, + void *data), + void *data); static inline int notify_remote_via_evtchn(int port) { |