home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / src / linux-headers-2.6.17-6 / include / asm-i386 / kdebug.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-08-11  |  985 b   |  56 lines

  1. #ifndef _I386_KDEBUG_H
  2. #define _I386_KDEBUG_H 1
  3.  
  4. /*
  5.  * Aug-05 2004 Ported by Prasanna S Panchamukhi <prasanna@in.ibm.com>
  6.  * from x86_64 architecture.
  7.  */
  8. #include <linux/notifier.h>
  9.  
  10. struct pt_regs;
  11.  
  12. struct die_args {
  13.     struct pt_regs *regs;
  14.     const char *str;
  15.     long err;
  16.     int trapnr;
  17.     int signr;
  18. };
  19.  
  20. extern int register_die_notifier(struct notifier_block *);
  21. extern int unregister_die_notifier(struct notifier_block *);
  22. extern struct atomic_notifier_head i386die_chain;
  23.  
  24.  
  25. /* Grossly misnamed. */
  26. enum die_val {
  27.     DIE_OOPS = 1,
  28.     DIE_INT3,
  29.     DIE_DEBUG,
  30.     DIE_PANIC,
  31.     DIE_NMI,
  32.     DIE_DIE,
  33.     DIE_NMIWATCHDOG,
  34.     DIE_KERNELDEBUG,
  35.     DIE_TRAP,
  36.     DIE_GPF,
  37.     DIE_CALL,
  38.     DIE_NMI_IPI,
  39.     DIE_PAGE_FAULT,
  40. };
  41.  
  42. static inline int notify_die(enum die_val val, const char *str,
  43.             struct pt_regs *regs, long err, int trap, int sig)
  44. {
  45.     struct die_args args = {
  46.         .regs = regs,
  47.         .str = str,
  48.         .err = err,
  49.         .trapnr = trap,
  50.         .signr = sig
  51.     };
  52.     return atomic_notifier_call_chain(&i386die_chain, val, &args);
  53. }
  54.  
  55. #endif
  56.