From: Samuel Thibault <samuel.thibault@eu.citrix.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] [Mini-OS] use ASSERT for BUG_ON
Date: Thu, 17 Jan 2008 13:46:02 +0000 [thread overview]
Message-ID: <20080117134602.GD11129@implementation.uk.xensource.com> (raw)
use ASSERT for BUG_ON
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
# HG changeset patch
# User Samuel Thibault <samuel.thibault@eu.citrix.com>
# Date 1200577496 0
# Node ID 4d261c3c7c20430433da2d59f3037f34f3598046
# Parent a7922b798098383d87bd62a4cc27595cfaad8dbe
use ASSERT for BUG_ON
diff -r a7922b798098 -r 4d261c3c7c20 extras/mini-os/console/xencons_ring.c
--- a/extras/mini-os/console/xencons_ring.c Thu Jan 17 13:38:47 2008 +0000
+++ b/extras/mini-os/console/xencons_ring.c Thu Jan 17 13:44:56 2008 +0000
@@ -8,9 +8,6 @@
#include <xenbus.h>
#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)
{
diff -r a7922b798098 -r 4d261c3c7c20 extras/mini-os/include/lib.h
--- a/extras/mini-os/include/lib.h Thu Jan 17 13:38:47 2008 +0000
+++ b/extras/mini-os/include/lib.h Thu Jan 17 13:44:56 2008 +0000
@@ -111,6 +111,8 @@ do {
} \
} while(0)
+#define BUG_ON(x) ASSERT(!(x))
+
/* Consistency check as much as possible. */
void sanity_check(void);
diff -r a7922b798098 -r 4d261c3c7c20 extras/mini-os/xenbus/xenbus.c
--- a/extras/mini-os/xenbus/xenbus.c Thu Jan 17 13:38:47 2008 +0000
+++ b/extras/mini-os/xenbus/xenbus.c Thu Jan 17 13:44:56 2008 +0000
@@ -27,10 +27,6 @@
#include <xen/io/xs_wire.h>
#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); \
reply other threads:[~2008-01-17 13:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080117134602.GD11129@implementation.uk.xensource.com \
--to=samuel.thibault@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.