xref: /openbsd-src/sys/arch/arm/include/signal.h (revision 74f6b3c1e3aba38f8feec08c2adb8e8ca18686b6)
1*74f6b3c1Skettenis /*	$OpenBSD: signal.h,v 1.10 2018/06/23 22:15:14 kettenis Exp $	*/
2e1e4f5b1Sdrahn /*	$NetBSD: signal.h,v 1.5 2003/10/18 17:57:21 briggs Exp $	*/
3e1e4f5b1Sdrahn 
4e1e4f5b1Sdrahn /*
5e1e4f5b1Sdrahn  * Copyright (c) 1994-1996 Mark Brinicombe.
6e1e4f5b1Sdrahn  * Copyright (c) 1994 Brini.
7e1e4f5b1Sdrahn  * All rights reserved.
8e1e4f5b1Sdrahn  *
9e1e4f5b1Sdrahn  * This code is derived from software written for Brini by Mark Brinicombe
10e1e4f5b1Sdrahn  *
11e1e4f5b1Sdrahn  * Redistribution and use in source and binary forms, with or without
12e1e4f5b1Sdrahn  * modification, are permitted provided that the following conditions
13e1e4f5b1Sdrahn  * are met:
14e1e4f5b1Sdrahn  * 1. Redistributions of source code must retain the above copyright
15e1e4f5b1Sdrahn  *    notice, this list of conditions and the following disclaimer.
16e1e4f5b1Sdrahn  * 2. Redistributions in binary form must reproduce the above copyright
17e1e4f5b1Sdrahn  *    notice, this list of conditions and the following disclaimer in the
18e1e4f5b1Sdrahn  *    documentation and/or other materials provided with the distribution.
19e1e4f5b1Sdrahn  * 3. All advertising materials mentioning features or use of this software
20e1e4f5b1Sdrahn  *    must display the following acknowledgement:
21e1e4f5b1Sdrahn  *	This product includes software developed by Brini.
22e1e4f5b1Sdrahn  * 4. The name of the company nor the name of the author may be used to
23e1e4f5b1Sdrahn  *    endorse or promote products derived from this software without specific
24e1e4f5b1Sdrahn  *    prior written permission.
25e1e4f5b1Sdrahn  *
26e1e4f5b1Sdrahn  * THIS SOFTWARE IS PROVIDED BY BRINI ``AS IS'' AND ANY EXPRESS OR IMPLIED
27e1e4f5b1Sdrahn  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
28e1e4f5b1Sdrahn  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
29e1e4f5b1Sdrahn  * IN NO EVENT SHALL BRINI OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
30e1e4f5b1Sdrahn  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
31e1e4f5b1Sdrahn  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
32e1e4f5b1Sdrahn  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33e1e4f5b1Sdrahn  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34e1e4f5b1Sdrahn  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35e1e4f5b1Sdrahn  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36e1e4f5b1Sdrahn  * SUCH DAMAGE.
37e1e4f5b1Sdrahn  *
38e1e4f5b1Sdrahn  * RiscBSD kernel project
39e1e4f5b1Sdrahn  *
40e1e4f5b1Sdrahn  * signal.h
41e1e4f5b1Sdrahn  *
42e1e4f5b1Sdrahn  * Architecture dependant signal types and structures
43e1e4f5b1Sdrahn  *
44e1e4f5b1Sdrahn  * Created      : 30/09/94
45e1e4f5b1Sdrahn  */
46e1e4f5b1Sdrahn 
472fa72412Spirofti #ifndef _ARM_SIGNAL_H_
482fa72412Spirofti #define _ARM_SIGNAL_H_
49e1e4f5b1Sdrahn 
502763461aSmillert #ifndef _LOCORE
517c2ef5d9Smillert #include <sys/cdefs.h>
527c2ef5d9Smillert 
53e1e4f5b1Sdrahn typedef int sig_atomic_t;
54e1e4f5b1Sdrahn 
559fa6b648Smillert #if __BSD_VISIBLE || __XPG_VISIBLE >= 420
56e1e4f5b1Sdrahn /*
57e1e4f5b1Sdrahn  * Information pushed on stack when a signal is delivered.
58e1e4f5b1Sdrahn  * This is used by the kernel to restore state following
59e1e4f5b1Sdrahn  * execution of the signal handler.  It is also made available
60e1e4f5b1Sdrahn  * to the handler to allow it to restore state properly if
61e1e4f5b1Sdrahn  * a non-standard exit is performed.
62e1e4f5b1Sdrahn  */
63e1e4f5b1Sdrahn struct sigcontext {
647730d1d9Sderaadt 	long	sc_cookie;
657730d1d9Sderaadt 	int	sc_mask;	/* signal mask to restore */
66e1e4f5b1Sdrahn 
67e1e4f5b1Sdrahn 	unsigned int sc_spsr;
68e1e4f5b1Sdrahn 	unsigned int sc_r0;
69e1e4f5b1Sdrahn 	unsigned int sc_r1;
70e1e4f5b1Sdrahn 	unsigned int sc_r2;
71e1e4f5b1Sdrahn 	unsigned int sc_r3;
72e1e4f5b1Sdrahn 	unsigned int sc_r4;
73e1e4f5b1Sdrahn 	unsigned int sc_r5;
74e1e4f5b1Sdrahn 	unsigned int sc_r6;
75e1e4f5b1Sdrahn 	unsigned int sc_r7;
76e1e4f5b1Sdrahn 	unsigned int sc_r8;
77e1e4f5b1Sdrahn 	unsigned int sc_r9;
78e1e4f5b1Sdrahn 	unsigned int sc_r10;
79e1e4f5b1Sdrahn 	unsigned int sc_r11;
80e1e4f5b1Sdrahn 	unsigned int sc_r12;
81e1e4f5b1Sdrahn 	unsigned int sc_usr_sp;
82e1e4f5b1Sdrahn 	unsigned int sc_usr_lr;
83e1e4f5b1Sdrahn 	unsigned int sc_svc_lr;
84e1e4f5b1Sdrahn 	unsigned int sc_pc;
85*74f6b3c1Skettenis 
86*74f6b3c1Skettenis 	unsigned int sc_fpused;
87*74f6b3c1Skettenis 	unsigned int sc_fpscr;
88*74f6b3c1Skettenis 	unsigned long long sc_fpreg[32];
89e1e4f5b1Sdrahn };
909fa6b648Smillert #endif /* __BSD_VISIBLE || __XPG_VISIBLE >= 420 */
91e1e4f5b1Sdrahn #endif /* !_LOCORE */
92e1e4f5b1Sdrahn 
932fa72412Spirofti #endif	/* !_ARM_SIGNAL_H_ */
94