aboutsummaryrefslogtreecommitdiffstats
path: root/extras/mini-os/events.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-05-08 11:53:39 +0100
committerKeir Fraser <keir.fraser@citrix.com>2008-05-08 11:53:39 +0100
commitb585b4dfa76737c797d6a981eacc99eb54551331 (patch)
tree3232d9d2bc9b2824481fd0af0814ffd192b2abc4 /extras/mini-os/events.c
parentf095afd3f6e061d8cc1077442c3b2c2a32e466bb (diff)
downloadxen-b585b4dfa76737c797d6a981eacc99eb54551331.tar.gz
xen-b585b4dfa76737c797d6a981eacc99eb54551331.tar.bz2
xen-b585b4dfa76737c797d6a981eacc99eb54551331.zip
minios: clear the event before calling the handler since (especially
in the SMP case) the handler may make another domain send an event again, and that must not be lost. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Diffstat (limited to 'extras/mini-os/events.c')
-rw-r--r--extras/mini-os/events.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/extras/mini-os/events.c b/extras/mini-os/events.c
index 51a3cc24f0..f47fc38822 100644
--- a/extras/mini-os/events.c
+++ b/extras/mini-os/events.c
@@ -58,9 +58,12 @@ void unbind_all_ports(void)
int do_event(evtchn_port_t port, struct pt_regs *regs)
{
ev_action_t *action;
+
+ clear_evtchn(port);
+
if (port >= NR_EVS) {
printk("Port number too large: %d\n", port);
- goto out;
+ return 1;
}
action = &ev_actions[port];
@@ -69,9 +72,6 @@ int do_event(evtchn_port_t port, struct pt_regs *regs)
/* call the handler */
action->handler(port, regs, action->data);
- out:
- clear_evtchn(port);
-
return 1;
}