]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/mini-os.git/commitdiff
minios: use ASSERT for BUG_ON
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 17 Jan 2008 14:40:23 +0000 (14:40 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 17 Jan 2008 14:40:23 +0000 (14:40 +0000)
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
console/xencons_ring.c
include/lib.h
xenbus/xenbus.c

index 1f9f49786650bd6a72319f471faac76d29586d1f..f0cf9203aea45a1d2ecda73c6b2d531747b84c0c 100644 (file)
@@ -9,9 +9,6 @@
 #include <xen/io/console.h>
 
 
-/* TODO - need to define BUG_ON for whole mini-os, need crash-dump as well */
-#define BUG_ON(_cond)   do{if(_cond) do_exit();} while(0);
-
 static inline struct xencons_interface *xencons_interface(void)
 {
     return mfn_to_virt(start_info.console.domU.mfn);
index 1673d88424f79613a5ad07f69c2e349faa04b39c..97a2305daa515ee6a5005d98e94f1233db2d1197 100644 (file)
@@ -111,6 +111,8 @@ do {                                                           \
        }                                                          \
 } while(0)
 
+#define BUG_ON(x) ASSERT(!(x))
+
 /* Consistency check as much as possible. */
 void sanity_check(void);
 
index d0dddad64ef4a7a286f000ad2b3f153fb1d03470..a4aa0ac77dd0e8c87f011e0eb98fccf1e0cc0dda 100644 (file)
 #include <spinlock.h>
 #include <xmalloc.h>
 
-#define BUG_ON(x) do { \
-    if (x) {printk("BUG at %s:%d\n", __FILE__, __LINE__); BUG(); } \
-} while (0)
-
 #define min(x,y) ({                       \
         typeof(x) tmpx = (x);                 \
         typeof(y) tmpy = (y);                 \