diff options
author | Dave Kleikamp <shaggy@austin.ibm.com> | 2006-01-24 15:34:47 -0500 |
---|---|---|
committer | Dave Kleikamp <shaggy@austin.ibm.com> | 2006-01-24 15:34:47 -0500 |
commit | 0a0fc0ddbe732779366ab6b1b879f62195e65967 (patch) | |
tree | 7b42490a676cf39ae0691b6859ecf7fd410f229b /fs/xfs/support/debug.h | |
parent | 4d5dbd0945d9e0833dd7964a3d6ee33157f7cc7a (diff) | |
parent | 3ee68c4af3fd7228c1be63254b9f884614f9ebb2 (diff) |
Merge with /home/shaggy/git/linus-clean/
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 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) | |||
31 | __attribute__ ((format (printf, 2, 0))); | 31 | __attribute__ ((format (printf, 2, 0))); |
32 | extern void cmn_err(int, char *, ...) | 32 | extern void cmn_err(int, char *, ...) |
33 | __attribute__ ((format (printf, 2, 3))); | 33 | __attribute__ ((format (printf, 2, 3))); |
34 | extern void assfail(char *expr, char *f, int l); | ||
34 | 35 | ||
35 | #ifndef STATIC | 36 | #define prdev(fmt,targ,args...) \ |
36 | # define STATIC static | 37 | printk("Device %s - " fmt "\n", XFS_BUFTARG_NAME(targ), ## args) |
37 | #endif | ||
38 | 38 | ||
39 | #ifdef DEBUG | 39 | #define ASSERT_ALWAYS(expr) \ |
40 | # define ASSERT(EX) ((EX) ? ((void)0) : assfail(#EX, __FILE__, __LINE__)) | 40 | (unlikely((expr) != 0) ? (void)0 : assfail(#expr, __FILE__, __LINE__)) |
41 | #else | ||
42 | # define ASSERT(x) ((void)0) | ||
43 | #endif | ||
44 | 41 | ||
45 | extern void assfail(char *, char *, int); | 42 | #ifndef DEBUG |
46 | #ifdef DEBUG | 43 | # define ASSERT(expr) ((void)0) |
44 | #else | ||
45 | # define ASSERT(expr) ASSERT_ALWAYS(expr) | ||
47 | extern unsigned long random(void); | 46 | extern unsigned long random(void); |
48 | extern int get_thread_id(void); | ||
49 | #endif | 47 | #endif |
50 | 48 | ||
51 | #define ASSERT_ALWAYS(EX) ((EX)?((void)0):assfail(#EX, __FILE__, __LINE__)) | 49 | #ifndef STATIC |
52 | #define debug_stop_all_cpus(param) /* param is "cpumask_t *" */ | 50 | # define STATIC static |
51 | #endif | ||
53 | 52 | ||
54 | #endif /* __XFS_SUPPORT_DEBUG_H__ */ | 53 | #endif /* __XFS_SUPPORT_DEBUG_H__ */ |