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] [RFC][PATCH] synchronize console on BUG()

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [RFC][PATCH] synchronize console on BUG()
From: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
Date: Wed, 28 Jun 2006 10:07:39 -0400
Delivery-date: Wed, 28 Jun 2006 07:10:40 -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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
The following patch syncs (and unsync) the console while we are in the
BUG() macro.

The separate externs (which I dislike) for these console calls are
there because including <xen/console.h> breaks all sorts of files, any
suggestions on how to solve this is welcome.

-JX

--

diff -r 1da8f53ce65b xen/include/xen/lib.h
--- a/xen/include/xen/lib.h     Tue Jun 27 18:24:08 2006 +0100
+++ b/xen/include/xen/lib.h     Wed Jun 28 09:56:34 2006 -0400
@@ -8,10 +8,14 @@
 #include <xen/xmalloc.h>
 #include <xen/string.h>
 
-#define BUG() do {                                     \
+extern void console_start_sync(void);
+extern void console_end_sync(void);
+#define BUG() do {                                      \
+    console_start_sync();                               \
     debugtrace_dump();                                  \
-    printk("BUG at %s:%d\n", __FILE__, __LINE__);      \
+    printk("BUG at %s:%d\n", __FILE__, __LINE__);       \
     FORCE_CRASH();                                      \
+    console_end_sync();                                 \
 } while ( 0 )
 
 #define BUG_ON(_p) do { if (_p) BUG(); } while ( 0 )

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

<Prev in Thread] Current Thread [Next in Thread>