From b67d22171a9438ba5aed3710b870f569c59562d1 Mon Sep 17 00:00:00 2001 From: Bill Joy Date: Sun, 31 Oct 1982 23:15:19 -0800 Subject: [PATCH] change to T_... names for trap codes SCCS-vsn: sys/vax/vax/trap.c 4.23 SCCS-vsn: sys/vax/include/trap.h 4.7 --- usr/src/sys/vax/include/trap.h | 30 +++++++++++++++--------------- usr/src/sys/vax/vax/trap.c | 34 +++++++++++++++++----------------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/usr/src/sys/vax/include/trap.h b/usr/src/sys/vax/include/trap.h index 885bca0aeb..9e1a197b2d 100644 --- a/usr/src/sys/vax/include/trap.h +++ b/usr/src/sys/vax/include/trap.h @@ -1,22 +1,22 @@ -/* trap.h 4.6 81/03/03 */ +/* trap.h 4.7 82/10/31 */ /* * Trap type values */ /* The first three constant values are known to the real world */ -#define RESADFLT 0 /* reserved addressing fault */ -#define PRIVINFLT 1 /* privileged instruction fault */ -#define RESOPFLT 2 /* reserved operand fault */ +#define T_RESADFLT 0 /* reserved addressing fault */ +#define T_PRIVINFLT 1 /* privileged instruction fault */ +#define T_RESOPFLT 2 /* reserved operand fault */ /* End of known constants */ -#define BPTFLT 3 /* bpt instruction fault */ -#define XFCFLT 4 /* xfc instruction fault */ -#define SYSCALL 5 /* chmk instruction (syscall trap) */ -#define ARITHTRAP 6 /* arithmetic trap */ -#define ASTFLT 7 /* software level 2 trap (ast deliv) */ -#define SEGFLT 8 /* segmentation fault */ -#define PROTFLT 9 /* protection fault */ -#define TRCTRAP 10 /* trace trap */ -#define COMPATFLT 11 /* compatibility mode fault */ -#define PAGEFLT 12 /* page fault */ -#define TABLEFLT 13 /* page table fault */ +#define T_BPTFLT 3 /* bpt instruction fault */ +#define T_XFCFLT 4 /* xfc instruction fault */ +#define T_SYSCALL 5 /* chmk instruction (syscall trap) */ +#define T_ARITHTRAP 6 /* arithmetic trap */ +#define T_ASTFLT 7 /* software level 2 trap (ast deliv) */ +#define T_SEGFLT 8 /* segmentation fault */ +#define T_PROTFLT 9 /* protection fault */ +#define T_TRCTRAP 10 /* trace trap */ +#define T_COMPATFLT 11 /* compatibility mode fault */ +#define T_PAGEFLT 12 /* page fault */ +#define T_TABLEFLT 13 /* page table fault */ diff --git a/usr/src/sys/vax/vax/trap.c b/usr/src/sys/vax/vax/trap.c index 4b1cb0d2ed..6a04670a55 100644 --- a/usr/src/sys/vax/vax/trap.c +++ b/usr/src/sys/vax/vax/trap.c @@ -1,4 +1,4 @@ -/* trap.c 4.22 82/10/21 */ +/* trap.c 4.23 82/10/31 */ #include "../h/param.h" #include "../h/systm.h" @@ -66,22 +66,22 @@ trap(sp, type, code, pc, psl) panic(trap_type[type]); panic("trap"); - case PROTFLT + USER: /* protection fault */ + case T_PROTFLT+USER: /* protection fault */ i = SIGBUS; break; - case PRIVINFLT + USER: /* privileged instruction fault */ - case RESADFLT + USER: /* reserved addressing fault */ - case RESOPFLT + USER: /* resereved operand fault */ + case T_PRIVINFLT+USER: /* privileged instruction fault */ + case T_RESADFLT+USER: /* reserved addressing fault */ + case T_RESOPFLT+USER: /* resereved operand fault */ u.u_code = type &~ USER; i = SIGILL; break; - case ASTFLT + USER: + case T_ASTFLT+USER: astoff(); goto out; - case ARITHTRAP + USER: + case T_ARITHTRAP+USER: u.u_code = code; i = SIGFPE; break; @@ -90,36 +90,36 @@ trap(sp, type, code, pc, psl) * If the user SP is above the stack segment, * grow the stack automatically. */ - case SEGFLT + USER: + case T_SEGFLT+USER: if (grow((unsigned)locr0[SP]) || grow(code)) goto out; i = SIGSEGV; break; - case TABLEFLT: /* allow page table faults in kernel mode */ - case TABLEFLT + USER: /* page table fault */ + case T_TABLEFLT: /* allow page table faults in kernel mode */ + case T_TABLEFLT+USER: /* page table fault */ panic("ptable fault"); - case PAGEFLT: /* allow page faults in kernel mode */ - case PAGEFLT + USER: /* page fault */ + case T_PAGEFLT: /* allow page faults in kernel mode */ + case T_PAGEFLT+USER: /* page fault */ i = u.u_error; pagein(code); u.u_error = i; - if (type == PAGEFLT) + if (type == T_PAGEFLT) return; goto out; - case BPTFLT + USER: /* bpt instruction fault */ - case TRCTRAP + USER: /* trace trap */ + case T_BPTFLT+USER: /* bpt instruction fault */ + case T_TRCTRAP+USER: /* trace trap */ locr0[PS] &= ~PSL_T; i = SIGTRAP; break; - case XFCFLT + USER: /* xfc instruction fault */ + case T_XFCFLT+USER: /* xfc instruction fault */ i = SIGEMT; break; - case COMPATFLT + USER: /* compatibility mode fault */ + case T_COMPATFLT+USER: /* compatibility mode fault */ u.u_acflag |= ACOMPAT; u.u_code = code; i = SIGILL; -- 2.20.1