ia64/xen-unstable

changeset 17613:addfc2db07a3

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>
author Keir Fraser <keir.fraser@citrix.com>
date Thu May 08 11:53:39 2008 +0100 (2008-05-08)
parents 72e70f9041c2
children 37cf8747f55b
files extras/mini-os/events.c
line diff
     1.1 --- a/extras/mini-os/events.c	Thu May 08 11:27:22 2008 +0100
     1.2 +++ b/extras/mini-os/events.c	Thu May 08 11:53:39 2008 +0100
     1.3 @@ -58,9 +58,12 @@ void unbind_all_ports(void)
     1.4  int do_event(evtchn_port_t port, struct pt_regs *regs)
     1.5  {
     1.6      ev_action_t  *action;
     1.7 +
     1.8 +    clear_evtchn(port);
     1.9 +
    1.10      if (port >= NR_EVS) {
    1.11          printk("Port number too large: %d\n", port);
    1.12 -		goto out;
    1.13 +        return 1;
    1.14      }
    1.15  
    1.16      action = &ev_actions[port];
    1.17 @@ -69,9 +72,6 @@ int do_event(evtchn_port_t port, struct 
    1.18      /* call the handler */
    1.19  	action->handler(port, regs, action->data);
    1.20  
    1.21 - out:
    1.22 -	clear_evtchn(port);
    1.23 -
    1.24      return 1;
    1.25  
    1.26  }