ia64/xen-unstable

changeset 16733:10101bc8181f

minios: use ASSERT for BUG_ON

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Jan 17 14:40:23 2008 +0000 (2008-01-17)
parents b18f70656fdb
children a26aee4a1522
files extras/mini-os/console/xencons_ring.c extras/mini-os/include/lib.h extras/mini-os/xenbus/xenbus.c
line diff
     1.1 --- a/extras/mini-os/console/xencons_ring.c	Thu Jan 17 14:40:06 2008 +0000
     1.2 +++ b/extras/mini-os/console/xencons_ring.c	Thu Jan 17 14:40:23 2008 +0000
     1.3 @@ -9,9 +9,6 @@
     1.4  #include <xen/io/console.h>
     1.5  
     1.6  
     1.7 -/* TODO - need to define BUG_ON for whole mini-os, need crash-dump as well */
     1.8 -#define BUG_ON(_cond)   do{if(_cond) do_exit();} while(0);
     1.9 -
    1.10  static inline struct xencons_interface *xencons_interface(void)
    1.11  {
    1.12      return mfn_to_virt(start_info.console.domU.mfn);
     2.1 --- a/extras/mini-os/include/lib.h	Thu Jan 17 14:40:06 2008 +0000
     2.2 +++ b/extras/mini-os/include/lib.h	Thu Jan 17 14:40:23 2008 +0000
     2.3 @@ -111,6 +111,8 @@ do {                                    
     2.4  	}                                                          \
     2.5  } while(0)
     2.6  
     2.7 +#define BUG_ON(x) ASSERT(!(x))
     2.8 +
     2.9  /* Consistency check as much as possible. */
    2.10  void sanity_check(void);
    2.11  
     3.1 --- a/extras/mini-os/xenbus/xenbus.c	Thu Jan 17 14:40:06 2008 +0000
     3.2 +++ b/extras/mini-os/xenbus/xenbus.c	Thu Jan 17 14:40:23 2008 +0000
     3.3 @@ -28,10 +28,6 @@
     3.4  #include <spinlock.h>
     3.5  #include <xmalloc.h>
     3.6  
     3.7 -#define BUG_ON(x) do { \
     3.8 -    if (x) {printk("BUG at %s:%d\n", __FILE__, __LINE__); BUG(); } \
     3.9 -} while (0)
    3.10 -
    3.11  #define min(x,y) ({                       \
    3.12          typeof(x) tmpx = (x);                 \
    3.13          typeof(y) tmpy = (y);                 \