trap.h (49081) | trap.h (49098) |
---|---|
1/*- 2 * Copyright (c) 1990 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * William Jolitz. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * 36 * from: @(#)trap.h 5.4 (Berkeley) 5/9/91 | 1/*- 2 * Copyright (c) 1990 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * William Jolitz. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * 36 * from: @(#)trap.h 5.4 (Berkeley) 5/9/91 |
37 * $Id: trap.h,v 1.7 1997/02/22 09:35:19 peter Exp $ | 37 * $Id: trap.h,v 1.8 1999/07/25 13:16:08 cracauer Exp $ |
38 */ 39 40#ifndef _MACHINE_TRAP_H_ 41#define _MACHINE_TRAP_H_ 42 43/* 44 * Trap type values 45 * also known in trap.c for name strings --- 25 unchanged lines hidden (view full) --- 71 72/* definitions for <sys/signal.h> */ 73#define ILL_RESAD_FAULT T_RESADFLT 74#define ILL_PRIVIN_FAULT T_PRIVINFLT 75#define ILL_RESOP_FAULT T_RESOPFLT 76#define ILL_ALIGN_FAULT T_ALIGNFLT 77#define ILL_FPOP_FAULT T_FPOPFLT /* coprocessor operand fault */ 78 | 38 */ 39 40#ifndef _MACHINE_TRAP_H_ 41#define _MACHINE_TRAP_H_ 42 43/* 44 * Trap type values 45 * also known in trap.c for name strings --- 25 unchanged lines hidden (view full) --- 71 72/* definitions for <sys/signal.h> */ 73#define ILL_RESAD_FAULT T_RESADFLT 74#define ILL_PRIVIN_FAULT T_PRIVINFLT 75#define ILL_RESOP_FAULT T_RESOPFLT 76#define ILL_ALIGN_FAULT T_ALIGNFLT 77#define ILL_FPOP_FAULT T_FPOPFLT /* coprocessor operand fault */ 78 |
79/* 80 * codes for SIGFPE/ARITHTRAP 81 * 82 */ 83/* portable macros */ | 79/* portable macros for SIGFPE/ARITHTRAP */ |
84#define FPE_INTDIV 1 /* integer divide by zero */ 85#define FPE_INTOVF 2 /* integer overflow */ 86#define FPE_FLTDIV 3 /* floating point divide by zero */ 87#define FPE_FLTOVF 4 /* floating point overflow */ 88#define FPE_FLTUND 5 /* floating point underflow */ 89#define FPE_FLTRES 6 /* floating point inexact result */ 90#define FPE_FLTINV 7 /* invalid floating point operation */ 91#define FPE_FLTSUB 8 /* subscript out of range */ 92 93/* old FreeBSD macros, deprecated */ | 80#define FPE_INTDIV 1 /* integer divide by zero */ 81#define FPE_INTOVF 2 /* integer overflow */ 82#define FPE_FLTDIV 3 /* floating point divide by zero */ 83#define FPE_FLTOVF 4 /* floating point overflow */ 84#define FPE_FLTUND 5 /* floating point underflow */ 85#define FPE_FLTRES 6 /* floating point inexact result */ 86#define FPE_FLTINV 7 /* invalid floating point operation */ 87#define FPE_FLTSUB 8 /* subscript out of range */ 88 89/* old FreeBSD macros, deprecated */ |
94#define FPE_INTOVF_TRAP 0x1 /* integer overflow */ 95#define FPE_INTDIV_TRAP 0x2 /* integer divide by zero */ 96#define FPE_FLTDIV_TRAP 0x3 /* floating/decimal divide by zero */ 97#define FPE_FLTOVF_TRAP 0x4 /* floating overflow */ 98#define FPE_FLTUND_TRAP 0x5 /* floating underflow */ 99#define FPE_FPU_NP_TRAP 0x6 /* floating point unit not present 100 * - won't happen in practice 101 */ 102#define FPE_SUBRNG_TRAP 0x7 /* subrange out of bounds */ | 90#define FPE_INTOVF_TRAP 0x1 /* integer overflow */ 91#define FPE_INTDIV_TRAP 0x2 /* integer divide by zero */ 92#define FPE_FLTDIV_TRAP 0x3 /* floating/decimal divide by zero */ 93#define FPE_FLTOVF_TRAP 0x4 /* floating overflow */ 94#define FPE_FLTUND_TRAP 0x5 /* floating underflow */ 95#define FPE_FPU_NP_TRAP 0x6 /* floating point unit not present */ 96#define FPE_SUBRNG_TRAP 0x7 /* subrange out of bounds */ |
103 104/* codes for SIGBUS */ 105#define BUS_PAGE_FAULT T_PAGEFLT /* page fault protection base */ 106#define BUS_SEGNP_FAULT T_SEGNPFLT /* segment not present */ 107#define BUS_STK_FAULT T_STKFLT /* stack segment */ 108#define BUS_SEGM_FAULT T_RESERVED /* segment protection base */ 109 110/* Trap's coming from user mode */ 111#define T_USER 0x100 112 113#endif /* !_MACHINE_TRAP_H_ */ | 97 98/* codes for SIGBUS */ 99#define BUS_PAGE_FAULT T_PAGEFLT /* page fault protection base */ 100#define BUS_SEGNP_FAULT T_SEGNPFLT /* segment not present */ 101#define BUS_STK_FAULT T_STKFLT /* stack segment */ 102#define BUS_SEGM_FAULT T_RESERVED /* segment protection base */ 103 104/* Trap's coming from user mode */ 105#define T_USER 0x100 106 107#endif /* !_MACHINE_TRAP_H_ */ |