svr4_ucontext.h revision 49267
1116743Ssam/*
2186904Ssam * Copyright (c) 1998 Mark Newton
3116743Ssam * Copyright (c) 1994 Christos Zoulas
4116743Ssam * All rights reserved.
5116743Ssam *
6116743Ssam * Redistribution and use in source and binary forms, with or without
7116743Ssam * modification, are permitted provided that the following conditions
8116743Ssam * are met:
9116743Ssam * 1. Redistributions of source code must retain the above copyright
10116743Ssam *    notice, this list of conditions and the following disclaimer.
11116743Ssam * 2. Redistributions in binary form must reproduce the above copyright
12116743Ssam *    notice, this list of conditions and the following disclaimer in the
13116743Ssam *    documentation and/or other materials provided with the distribution.
14116743Ssam * 3. The name of the author may not be used to endorse or promote products
15116743Ssam *    derived from this software without specific prior written permission
16116743Ssam *
17116743Ssam * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18116743Ssam * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19116743Ssam * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20116743Ssam * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21116743Ssam * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22116743Ssam * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23116743Ssam * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24116743Ssam * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25116743Ssam * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26116743Ssam * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27116743Ssam *
28116743Ssam * $Id$
29116743Ssam */
30116743Ssam
31116743Ssam#ifndef	_SVR4_UCONTEXT_H_
32116743Ssam#define	_SVR4_UCONTEXT_H_
33116743Ssam
34116743Ssam/*
35116743Ssam * Machine context
36116743Ssam */
37116743Ssam
38227327Sadrian#define SVR4_UC_SIGMASK		0x01
39227327Sadrian#define	SVR4_UC_STACK		0x02
40227327Sadrian
41227327Sadrian#define SVR4_UC_CPU		0x04
42227327Sadrian#define SVR4_UC_FPU		0x08
43227327Sadrian#define SVR4_UC_WEITEK		0x10
44227327Sadrian
45227327Sadrian#define SVR4_UC_MCONTEXT	(SVR4_UC_CPU|SVR4_UC_FPU|SVR4_UC_WEITEK)
46233989Sadrian
47227327Sadrian#define SVR4_UC_ALL		(SVR4_UC_SIGMASK|SVR4_UC_STACK|SVR4_UC_MCONTEXT)
48227327Sadrian
49234090Sadriantypedef struct svr4_ucontext {
50234090Sadrian	u_long			 uc_flags;
51234090Sadrian  /*	struct svr4_ucontext	*uc_link;*/
52234090Sadrian        void                    *uc_link;
53116743Ssam	svr4_sigset_t		 uc_sigmask;
54116743Ssam	struct svr4_sigaltstack	 uc_stack;
55116743Ssam	svr4_mcontext_t		 uc_mcontext;
56116743Ssam	long			 uc_pad[5];
57155492Ssam} svr4_ucontext_t;
58138570Ssam
59116743Ssam#define SVR4_UC_GETREGSET	0
60116743Ssam#define SVR4_UC_SETREGSET	1
61116743Ssam
62138570Ssam/*
63116743Ssam * Signal frame
64138570Ssam */
65116743Ssamstruct svr4_sigframe {
66116743Ssam	int	sf_signum;
67116743Ssam	union	svr4_siginfo  *sf_sip;
68116743Ssam	struct	svr4_ucontext *sf_ucp;
69116743Ssam	sig_t	sf_handler;
70116743Ssam	struct	svr4_ucontext sf_uc;
71116743Ssam	union	svr4_siginfo  sf_si;
72116743Ssam};
73116743Ssam
74116743Ssam#endif /* !_SVR4_UCONTEXT_H_ */
75116743Ssam