2 /* From: NetBSD: signal.h,v 1.3 1997/04/06 08:47:43 cgd Exp */
5 * Copyright (c) 1994, 1995 Carnegie-Mellon University.
8 * Author: Chris G. Demetriou
10 * Permission to use, copy, modify and distribute this software and
11 * its documentation is hereby granted, provided that both the copyright
12 * notice and this permission notice appear in all copies of the
13 * software, derivative works or modified versions, and any portions
14 * thereof, and that both notices appear in supporting documentation.
16 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
17 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
18 * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
20 * Carnegie Mellon requests users of this software to return to
22 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
23 * School of Computer Science
24 * Carnegie Mellon University
25 * Pittsburgh PA 15213-3890
27 * any improvements or extensions that they make and grant Carnegie the
28 * rights to redistribute these changes.
31 #ifndef _MACHINE_SIGNAL_H_
32 #define _MACHINE_SIGNAL_H_
34 #include <sys/cdefs.h>
35 #include <sys/_sigset.h>
37 typedef long sig_atomic_t;
40 /* portable macros for SIGFPE/ARITHTRAP */
41 #define FPE_INTOVF 1 /* integer overflow */
42 #define FPE_INTDIV 2 /* integer divide by zero */
43 #define FPE_FLTDIV 3 /* floating point divide by zero */
44 #define FPE_FLTOVF 4 /* floating point overflow */
45 #define FPE_FLTUND 5 /* floating point underflow */
46 #define FPE_FLTRES 6 /* floating point inexact result */
47 #define FPE_FLTINV 7 /* invalid floating point operation */
48 #define FPE_FLTSUB 8 /* subscript out of range */
50 #define BUS_SEGM_FAULT 30 /* segment protection base */
54 * Information pushed on stack when a signal is delivered.
55 * This is used by the kernel to restore state following
56 * execution of the signal handler. It is also made available
57 * to the handler to allow it to restore state properly if
58 * a non-standard exit is performed.
62 #include <machine/_regset.h>
65 * The sequence of the fields should match those in
66 * mcontext_t. Keep them in sync!
69 struct __sigset sc_mask; /* signal mask to restore */
70 unsigned long sc_onstack;
71 unsigned long sc_flags;
72 struct _special sc_special;
73 struct _callee_saved sc_preserved;
74 struct _callee_saved_fp sc_preserved_fp;
75 struct _caller_saved sc_scratch;
76 struct _caller_saved_fp sc_scratch_fp;
77 struct _high_fp sc_high_fp;
79 #endif /* __BSD_VISIBLE */
81 #endif /* !_MACHINE_SIGNAL_H_*/