diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-12 09:10:34 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-12 09:10:34 -0800 |
commit | 9f5974c8734d83d4ab7096ed98136a82f41210d6 (patch) | |
tree | 6f328555796bafefb74936ab68128aa84efd28b1 /fs/xfs/support/debug.h | |
parent | a2d823bf13efea4c859376f6e85c49cfbad7ab60 (diff) | |
parent | ddae9c2ea79449beb00027cf77fca6dc489f2d15 (diff) | |
download | op-kernel-dev-9f5974c8734d83d4ab7096ed98136a82f41210d6.zip op-kernel-dev-9f5974c8734d83d4ab7096ed98136a82f41210d6.tar.gz |
Merge git://oss.sgi.com:8090/oss/git/xfs-2.6
Diffstat (limited to 'fs/xfs/support/debug.h')
-rw-r--r-- | fs/xfs/support/debug.h | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/fs/xfs/support/debug.h b/fs/xfs/support/debug.h index aff5586..e3bf581 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__ */ |