bug.h 549 B

1234567891011121314151617181920212223242526272829
  1. #ifndef _SPARC_BUG_H
  2. #define _SPARC_BUG_H
  3. #ifdef CONFIG_BUG
  4. #include <linux/compiler.h>
  5. #ifdef CONFIG_DEBUG_BUGVERBOSE
  6. void do_BUG(const char *file, int line);
  7. #define BUG() do { \
  8. do_BUG(__FILE__, __LINE__); \
  9. barrier_before_unreachable(); \
  10. __builtin_trap(); \
  11. } while (0)
  12. #else
  13. #define BUG() do { \
  14. barrier_before_unreachable(); \
  15. __builtin_trap(); \
  16. } while (0)
  17. #endif
  18. #define HAVE_ARCH_BUG
  19. #endif
  20. #include <asm-generic/bug.h>
  21. struct pt_regs;
  22. void __noreturn die_if_kernel(char *str, struct pt_regs *regs);
  23. #endif