Commit | Line | Data |
---|---|---|
430f81c3 MK |
1 | /* |
2 | * Copyright (c) 1988 Regents of the University of California. | |
3 | * All rights reserved. The Berkeley software License Agreement | |
4 | * specifies the terms and conditions for redistribution. | |
5 | * | |
6 | * @(#)trap.h 7.1 (Berkeley) %G% | |
7 | */ | |
a256b012 | 8 | |
6c45bcf0 MK |
9 | /* |
10 | * Trap type values | |
11 | * also known in trap.c for name strings | |
12 | */ | |
13 | ||
a256b012 SL |
14 | #define T_RESADFLT 0 /* reserved addressing */ |
15 | #define T_PRIVINFLT 1 /* privileged instruction */ | |
16 | #define T_RESOPFLT 2 /* reserved operand */ | |
a256b012 SL |
17 | #define T_BPTFLT 3 /* breakpoint instruction */ |
18 | #define T_SYSCALL 5 /* system call (kcall) */ | |
19 | #define T_ARITHTRAP 6 /* arithmetic trap */ | |
20 | #define T_ASTFLT 7 /* system forced exception */ | |
21 | #define T_SEGFLT 8 /* segmentation (limit) fault */ | |
22 | #define T_PROTFLT 9 /* protection fault */ | |
23 | #define T_TRCTRAP 10 /* trace trap */ | |
24 | #define T_PAGEFLT 12 /* page fault */ | |
25 | #define T_TABLEFLT 13 /* page table fault */ | |
26 | #define T_ALIGNFLT 14 /* alignment fault */ | |
27 | #define T_KSPNOTVAL 15 /* kernel stack pointer not valid */ | |
28 | #define T_BUSERR 16 /* bus error */ | |
c5747722 | 29 | #define T_KDBTRAP 17 /* kernel debugger trap */ |
6c45bcf0 MK |
30 | |
31 | /* definitions for <sys/signal.h> */ | |
32 | #define ILL_RESAD_FAULT T_RESADFLT | |
33 | #define ILL_PRIVIN_FAULT T_PRIVINFLT | |
34 | #define ILL_RESOP_FAULT T_RESOPFLT | |
35 | #define ILL_ALIGN_FAULT T_ALIGNFLT | |
36 | ||
37 | /* codes for SIGFPE/ARITHTRAP */ | |
38 | #define FPE_INTOVF_TRAP 0x1 /* integer overflow */ | |
39 | #define FPE_INTDIV_TRAP 0x2 /* integer divide by zero */ | |
40 | #define FPE_FLTDIV_TRAP 0x3 /* floating/decimal divide by zero */ | |
41 | #define FPE_FLTOVF_TRAP 0x4 /* floating overflow */ | |
42 | #define FPE_FLTUND_TRAP 0x5 /* floating underflow */ |