xref: /freebsd/sys/i386/include/ucontext.h (revision c5c6b7b38e4bca2844dc9f7e10f5791100c72b4c)
191078fcaSMarcel Moolenaar /*-
291078fcaSMarcel Moolenaar  * Copyright (c) 1999 Marcel Moolenaar
391078fcaSMarcel Moolenaar  * All rights reserved.
491078fcaSMarcel Moolenaar  *
591078fcaSMarcel Moolenaar  * Redistribution and use in source and binary forms, with or without
691078fcaSMarcel Moolenaar  * modification, are permitted provided that the following conditions
791078fcaSMarcel Moolenaar  * are met:
891078fcaSMarcel Moolenaar  * 1. Redistributions of source code must retain the above copyright
991078fcaSMarcel Moolenaar  *    notice, this list of conditions and the following disclaimer
1091078fcaSMarcel Moolenaar  *    in this position and unchanged.
1191078fcaSMarcel Moolenaar  * 2. Redistributions in binary form must reproduce the above copyright
1291078fcaSMarcel Moolenaar  *    notice, this list of conditions and the following disclaimer in the
1391078fcaSMarcel Moolenaar  *    documentation and/or other materials provided with the distribution.
1491078fcaSMarcel Moolenaar  * 3. The name of the author may not be used to endorse or promote products
1591078fcaSMarcel Moolenaar  *    derived from this software without specific prior written permission.
1691078fcaSMarcel Moolenaar  *
1791078fcaSMarcel Moolenaar  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
1891078fcaSMarcel Moolenaar  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
1991078fcaSMarcel Moolenaar  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
2091078fcaSMarcel Moolenaar  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
2191078fcaSMarcel Moolenaar  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
2291078fcaSMarcel Moolenaar  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2391078fcaSMarcel Moolenaar  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2491078fcaSMarcel Moolenaar  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2591078fcaSMarcel Moolenaar  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2691078fcaSMarcel Moolenaar  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2791078fcaSMarcel Moolenaar  *
2891078fcaSMarcel Moolenaar  * $FreeBSD$
2991078fcaSMarcel Moolenaar  */
3091078fcaSMarcel Moolenaar 
3191078fcaSMarcel Moolenaar #ifndef _MACHINE_UCONTEXT_H_
32c5c6b7b3SMarcel Moolenaar #define	_MACHINE_UCONTEXT_H_
3391078fcaSMarcel Moolenaar 
3491078fcaSMarcel Moolenaar #include <machine/frame.h>
3591078fcaSMarcel Moolenaar 
36c5c6b7b3SMarcel Moolenaar typedef struct __mcontext {
37c5c6b7b3SMarcel Moolenaar 	/*
38c5c6b7b3SMarcel Moolenaar 	 * The first 3 fields must match the definition of
39c5c6b7b3SMarcel Moolenaar 	 * sigcontext. So that we can support sigcontext
40c5c6b7b3SMarcel Moolenaar 	 * and ucontext_t at the same time.
41c5c6b7b3SMarcel Moolenaar 	 */
42c5c6b7b3SMarcel Moolenaar 	int	mc_onstack;		/* XXX - sigcontext compat. */
43c5c6b7b3SMarcel Moolenaar 	int	mc_gs;
44c5c6b7b3SMarcel Moolenaar 	struct	trapframe mc_tf;
45c5c6b7b3SMarcel Moolenaar 
4691078fcaSMarcel Moolenaar 	int	mc_fpregs[28];		/* env87 + fpacc87 + u_long */
4791078fcaSMarcel Moolenaar 	int	__spare__[17];
4891078fcaSMarcel Moolenaar } mcontext_t;
4991078fcaSMarcel Moolenaar 
50c5c6b7b3SMarcel Moolenaar #endif /* !_MACHINE_UCONTEXT_H_ */
51