From 3762ec6bf76cdd32653c409dbad09f7b85807c68 Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Thu, 12 Jan 2006 10:29:53 +1100 Subject: [XFS] Merge in trivial changes, sync up headers with userspace equivalents. SGI-PV: 907752 SGI-Modid: xfs-linux-melb:xfs-kern:24961a Signed-off-by: Nathan Scott --- fs/xfs/support/debug.h | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'fs/xfs/support/debug.h') diff --git a/fs/xfs/support/debug.h b/fs/xfs/support/debug.h index aff558664c32..e3bf58112e7e 100644 --- a/fs/xfs/support/debug.h +++ b/fs/xfs/support/debug.h @@ -31,24 +31,23 @@ extern void icmn_err(int, char *, va_list) __attribute__ ((format (printf, 2, 0))); extern void cmn_err(int, char *, ...) __attribute__ ((format (printf, 2, 3))); +extern void assfail(char *expr, char *f, int l); -#ifndef STATIC -# define STATIC static -#endif +#define prdev(fmt,targ,args...) \ + printk("Device %s - " fmt "\n", XFS_BUFTARG_NAME(targ), ## args) -#ifdef DEBUG -# define ASSERT(EX) ((EX) ? ((void)0) : assfail(#EX, __FILE__, __LINE__)) -#else -# define ASSERT(x) ((void)0) -#endif +#define ASSERT_ALWAYS(expr) \ + (unlikely((expr) != 0) ? (void)0 : assfail(#expr, __FILE__, __LINE__)) -extern void assfail(char *, char *, int); -#ifdef DEBUG +#ifndef DEBUG +# define ASSERT(expr) ((void)0) +#else +# define ASSERT(expr) ASSERT_ALWAYS(expr) extern unsigned long random(void); -extern int get_thread_id(void); #endif -#define ASSERT_ALWAYS(EX) ((EX)?((void)0):assfail(#EX, __FILE__, __LINE__)) -#define debug_stop_all_cpus(param) /* param is "cpumask_t *" */ +#ifndef STATIC +# define STATIC static +#endif #endif /* __XFS_SUPPORT_DEBUG_H__ */ -- cgit v1.2.1