WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] minios: clear the event before calling the handler

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] minios: clear the event before calling the handler
From: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
Date: Thu, 8 May 2008 11:27:13 +0100
Delivery-date: Thu, 08 May 2008 03:27:36 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.12-2006-07-14
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@xxxxxxxxxxxxx>

diff -r 4965e711fee8 extras/mini-os/events.c
--- a/extras/mini-os/events.c   Wed May 07 15:36:32 2008 +0100
+++ b/extras/mini-os/events.c   Thu May 08 11:26:26 2008 +0100
@@ -58,9 +58,12 @@ int do_event(evtchn_port_t port, struct 
 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];
@@ -68,9 +71,6 @@ int do_event(evtchn_port_t port, struct 
 
     /* call the handler */
        action->handler(port, regs, action->data);
-
- out:
-       clear_evtchn(port);
 
     return 1;
 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] minios: clear the event before calling the handler, Samuel Thibault <=