1178172Simp/*-
2178172Simp * Copyright (c) 1999 Marcel Moolenaar
3178172Simp * All rights reserved.
4178172Simp *
5178172Simp * Redistribution and use in source and binary forms, with or without
6178172Simp * modification, are permitted provided that the following conditions
7178172Simp * are met:
8178172Simp * 1. Redistributions of source code must retain the above copyright
9178172Simp *    notice, this list of conditions and the following disclaimer
10178172Simp *    in this position and unchanged.
11178172Simp * 2. Redistributions in binary form must reproduce the above copyright
12178172Simp *    notice, this list of conditions and the following disclaimer in the
13178172Simp *    documentation and/or other materials provided with the distribution.
14178172Simp * 3. The name of the author may not be used to endorse or promote products
15178172Simp *    derived from this software without specific prior written permission.
16178172Simp *
17178172Simp * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18178172Simp * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19178172Simp * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20178172Simp * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21178172Simp * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22178172Simp * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23178172Simp * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24178172Simp * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25178172Simp * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26178172Simp * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27178172Simp *
28178172Simp *	from: src/sys/alpha/include/sigframe.h,v 1.1 1999/09/29 15:06:26 marcel
29178172Simp *	from: sigframe.h,v 1.1 2006/08/07 05:38:57 katta
30178172Simp * $FreeBSD$
31178172Simp */
32178172Simp#ifndef _MACHINE_SIGFRAME_H_
33178172Simp#define	_MACHINE_SIGFRAME_H_
34178172Simp
35232449Sjmallett#if defined(_KERNEL) && !defined(KLD_MODULE) && !defined(_STANDALONE)
36232449Sjmallett#include "opt_compat.h"
37232449Sjmallett#endif
38232449Sjmallett
39178172Simp/*
40178172Simp * WARNING: code in locore.s assumes the layout shown for sf_signum
41178172Simp * thru sf_addr so... don't alter them!
42178172Simp */
43178172Simpstruct sigframe {
44178172Simp	register_t	sf_signum;
45178172Simp	register_t	sf_siginfo;	/* code or pointer to sf_si */
46178172Simp	register_t	sf_ucontext;	/* points to sf_uc */
47178172Simp	register_t	sf_addr;	/* undocumented 4th arg */
48178172Simp	ucontext_t	sf_uc;		/* = *sf_ucontext */
49178172Simp	siginfo_t	sf_si;		/* = *sf_siginfo (SA_SIGINFO case) */
50178172Simp	unsigned long	__spare__[2];
51178172Simp};
52178172Simp
53232449Sjmallett#if (defined(__mips_n32) || defined(__mips_n64)) && defined(COMPAT_FREEBSD32)
54232449Sjmallett#include <compat/freebsd32/freebsd32_signal.h>
55232449Sjmallett
56232449Sjmallettstruct sigframe32 {
57232449Sjmallett	int32_t		sf_signum;
58232449Sjmallett	int32_t		sf_siginfo;	/* code or pointer to sf_si */
59232449Sjmallett	int32_t		sf_ucontext;	/* points to sf_uc */
60232449Sjmallett	int32_t		sf_addr;	/* undocumented 4th arg */
61232449Sjmallett	ucontext32_t	sf_uc;		/* = *sf_ucontext */
62232449Sjmallett	struct siginfo32	sf_si;	/* = *sf_siginfo (SA_SIGINFO case) */
63232449Sjmallett	uint32_t	__spare__[2];
64232449Sjmallett};
65232449Sjmallett#endif
66232449Sjmallett
67178172Simp#endif /* !_MACHINE_SIGFRAME_H_ */
68