home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0010 - 0019 / ibm0010-0019 / ibm0010.tar / ibm0010 / UNIX3862.ZIP / U386-06.ZIP / U386-6.TD0 / usr / include / sys / trap.h < prev    next >
Encoding:
Text File  |  1988-06-26  |  1.4 KB  |  44 lines

  1. /*    Copyright (c) 1984, 1986, 1987, 1988 AT&T    */
  2. /*      All Rights Reserved      */
  3.  
  4. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T    */
  5. /*    The copyright notice above does not evidence any       */
  6. /*    actual or intended publication of such source code.    */
  7.  
  8.  
  9. #ident    "@(#)head.sys:trap.h    1.4"
  10.  
  11. /*
  12.  * Trap type values
  13.  */
  14.  
  15. #define    DIVERR        0    /* divide by 0 error        */
  16. #define    SGLSTP        1    /* single step            */
  17. #define    NMIFLT        2    /* NMI                */
  18. #define    BPTFLT        3    /* breakpoint fault        */
  19. #define    INTOFLT        4    /* INTO overflow fault        */
  20. #define    BOUNDFLT    5    /* BOUND instruction fault    */
  21. #define    INVOPFLT    6    /* invalid opcode fault        */
  22. #define    NOEXTFLT    7    /* extension not available fault*/
  23. #define    DBLFLT        8    /* double fault            */
  24. #define    EXTOVRFLT    9    /* extension overrun fault    */
  25. #define    INVTSSFLT    10    /* invalid TSS fault        */
  26. #define    SEGNPFLT    11    /* segment not present fault    */
  27. #define    STKFLT        12    /* stack fault            */
  28. #define    GPFLT        13    /* general protection fault    */
  29. #define    PGFLT        14    /* page fault            */
  30. #define    EXTERRFLT    16    /* extension error fault    */
  31. #define    ENDPERR        33    /* emulated extension error flt    */
  32. #define    ENOEXTFLT    32    /* emulated ext not present    */
  33.  
  34. /*
  35.  *  Values of error code on stack in case of page fault 
  36.  */
  37.  
  38. #define    PF_ERR_MASK    0x01    /* Mask for error bit */
  39. #define PF_ERR_PAGE    0    /* page not present */
  40. #define PF_ERR_PROT    1    /* protection error */
  41. #define PF_ERR_WRITE    2    /* fault caused by write (else read) */
  42. #define PF_ERR_USER    4    /* processor was in user mode
  43.                     (else supervisor) */
  44.