Rev 2927 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 2927 | Rev 3149 | ||
|---|---|---|---|
| Line 34... | Line 34... | ||
| 34 | 34 | ||
| 35 | #ifndef KERN_PANIC_H_ |
35 | #ifndef KERN_PANIC_H_ |
| 36 | #define KERN_PANIC_H_ |
36 | #define KERN_PANIC_H_ |
| 37 | 37 | ||
| 38 | #ifdef CONFIG_DEBUG |
38 | #ifdef CONFIG_DEBUG |
| 39 | #define panic(format, ...) \ |
39 | # define panic(format, ...) \ |
| 40 | panic_printf("Kernel panic in %s() at %s on line %d: " format, __func__, \ |
40 | panic_printf("Kernel panic in %s() at %s:%u: " format, __func__, \ |
| 41 | __FILE__, __LINE__, ##__VA_ARGS__); |
41 | __FILE__, __LINE__, ##__VA_ARGS__); |
| 42 | #else |
42 | #else |
| 43 | #define panic(format, ...) \ |
43 | # define panic(format, ...) \ |
| 44 | panic_printf("Kernel panic: " format, ##__VA_ARGS__); |
44 | panic_printf("Kernel panic: " format, ##__VA_ARGS__); |
| 45 | #endif |
45 | #endif |
| 46 | 46 | ||
| 47 | extern void panic_printf(char *fmt, ...) __attribute__((noreturn)) ; |
47 | extern void panic_printf(char *fmt, ...) __attribute__((noreturn)); |
| 48 | 48 | ||
| 49 | #endif |
49 | #endif |
| 50 | 50 | ||
| 51 | /** @} |
51 | /** @} |
| 52 | */ |
52 | */ |