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