signal.h revision 1.1.2.2 1 1.1.2.2 jdolecek /* $NetBSD: signal.h,v 1.1.2.2 2002/06/23 17:37:10 jdolecek Exp $ */
2 1.1.2.2 jdolecek
3 1.1.2.2 jdolecek /* $OpenBSD: signal.h,v 1.1 1998/06/23 19:45:27 mickey Exp $ */
4 1.1.2.2 jdolecek
5 1.1.2.2 jdolecek /*
6 1.1.2.2 jdolecek * Copyright (c) 1994, The University of Utah and
7 1.1.2.2 jdolecek * the Computer Systems Laboratory at the University of Utah (CSL).
8 1.1.2.2 jdolecek * All rights reserved.
9 1.1.2.2 jdolecek *
10 1.1.2.2 jdolecek * Permission to use, copy, modify and distribute this software is hereby
11 1.1.2.2 jdolecek * granted provided that (1) source code retains these copyright, permission,
12 1.1.2.2 jdolecek * and disclaimer notices, and (2) redistributions including binaries
13 1.1.2.2 jdolecek * reproduce the notices in supporting documentation, and (3) all advertising
14 1.1.2.2 jdolecek * materials mentioning features or use of this software display the following
15 1.1.2.2 jdolecek * acknowledgement: ``This product includes software developed by the
16 1.1.2.2 jdolecek * Computer Systems Laboratory at the University of Utah.''
17 1.1.2.2 jdolecek *
18 1.1.2.2 jdolecek * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
19 1.1.2.2 jdolecek * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
20 1.1.2.2 jdolecek * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
21 1.1.2.2 jdolecek *
22 1.1.2.2 jdolecek * CSL requests users of this software to return to csl-dist (at) cs.utah.edu any
23 1.1.2.2 jdolecek * improvements that they make and grant CSL redistribution rights.
24 1.1.2.2 jdolecek *
25 1.1.2.2 jdolecek * Utah $Hdr: signal.h 1.3 94/12/16$
26 1.1.2.2 jdolecek */
27 1.1.2.2 jdolecek
28 1.1.2.2 jdolecek /*
29 1.1.2.2 jdolecek * Machine-dependent signal definitions
30 1.1.2.2 jdolecek */
31 1.1.2.2 jdolecek
32 1.1.2.2 jdolecek typedef int sig_atomic_t;
33 1.1.2.2 jdolecek
34 1.1.2.2 jdolecek #ifndef _POSIX_SOURCE
35 1.1.2.2 jdolecek #include <machine/trap.h> /* codes for SIGILL, SIGFPE */
36 1.1.2.2 jdolecek #endif
37 1.1.2.2 jdolecek
38 1.1.2.2 jdolecek /*
39 1.1.2.2 jdolecek * Information pushed on stack when a signal is delivered.
40 1.1.2.2 jdolecek * This is used by the kernel to restore state following
41 1.1.2.2 jdolecek * execution of the signal handler. It is also made available
42 1.1.2.2 jdolecek * to the handler to allow it to restore state properly if
43 1.1.2.2 jdolecek * a non-standard exit is performed.
44 1.1.2.2 jdolecek */
45 1.1.2.2 jdolecek struct sigcontext {
46 1.1.2.2 jdolecek int sc_onstack; /* sigstack state to restore */
47 1.1.2.2 jdolecek int __sc_mask13; /* signal mask to restore (old style) */
48 1.1.2.2 jdolecek int sc_sp; /* sp to restore */
49 1.1.2.2 jdolecek int sc_fp; /* fp to restore */
50 1.1.2.2 jdolecek int sc_ap; /* ap to restore */
51 1.1.2.2 jdolecek int sc_pcsqh; /* pc space queue (head) to restore */
52 1.1.2.2 jdolecek int sc_pcoqh; /* pc offset queue (head) to restore */
53 1.1.2.2 jdolecek int sc_pcsqt; /* pc space queue (tail) to restore */
54 1.1.2.2 jdolecek int sc_pcoqt; /* pc offset queue (tail) to restore */
55 1.1.2.2 jdolecek int sc_ps; /* psl to restore */
56 1.1.2.2 jdolecek sigset_t sc_mask; /* signal mask to restore (new style) */
57 1.1.2.2 jdolecek };
58 1.1.2.2 jdolecek
59 1.1.2.2 jdolecek #if defined(_KERNEL)
60 1.1.2.2 jdolecek #include <hppa/frame.h>
61 1.1.2.2 jdolecek
62 1.1.2.2 jdolecek /*
63 1.1.2.2 jdolecek * Register state saved while kernel delivers a signal.
64 1.1.2.2 jdolecek */
65 1.1.2.2 jdolecek struct sigstate {
66 1.1.2.2 jdolecek int ss_flags; /* which of the following are valid */
67 1.1.2.2 jdolecek struct trapframe ss_frame; /* original exception frame */
68 1.1.2.2 jdolecek };
69 1.1.2.2 jdolecek
70 1.1.2.2 jdolecek #define SS_FPSTATE 0x01
71 1.1.2.2 jdolecek #define SS_USERREGS 0x02
72 1.1.2.2 jdolecek
73 1.1.2.2 jdolecek /*
74 1.1.2.2 jdolecek * Stack frame layout when delivering a signal.
75 1.1.2.2 jdolecek */
76 1.1.2.2 jdolecek struct sigframe {
77 1.1.2.2 jdolecek struct sigcontext sf_sc; /* actual context */
78 1.1.2.2 jdolecek struct sigstate sf_state; /* state of the hardware */
79 1.1.2.2 jdolecek /*
80 1.1.2.2 jdolecek * Everything below here must match the calling convention.
81 1.1.2.2 jdolecek * Per that convention, sendsig must initialize very little;
82 1.1.2.2 jdolecek * only sf_psp, sf_clup, sf_sl, and sf_edp must be set.
83 1.1.2.2 jdolecek * Note that this layout matches the HPPA_FRAME_ macros
84 1.1.2.2 jdolecek * in frame.h.
85 1.1.2.2 jdolecek */
86 1.1.2.2 jdolecek u_int sf_arg3;
87 1.1.2.2 jdolecek u_int sf_arg2;
88 1.1.2.2 jdolecek u_int sf_arg1;
89 1.1.2.2 jdolecek u_int sf_arg0;
90 1.1.2.2 jdolecek u_int sf_edp;
91 1.1.2.2 jdolecek u_int sf_esr4;
92 1.1.2.2 jdolecek u_int sf_erp;
93 1.1.2.2 jdolecek u_int sf_crp;
94 1.1.2.2 jdolecek u_int sf_sl;
95 1.1.2.2 jdolecek u_int sf_clup;
96 1.1.2.2 jdolecek u_int sf_ep;
97 1.1.2.2 jdolecek u_int sf_psp;
98 1.1.2.2 jdolecek };
99 1.1.2.2 jdolecek
100 1.1.2.2 jdolecek #endif /* _KERNEL */
101