git: be887b3e6cde - main - Move struct freebsd4_ucontext to sys/i386/include/ucontext.h.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Fri, 14 Jan 2022 01:18:08 UTC
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=be887b3e6cdec1b56db314b7da5501cf25c1a188

commit be887b3e6cdec1b56db314b7da5501cf25c1a188
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-01-14 01:17:43 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-01-14 01:17:43 +0000

    Move struct freebsd4_ucontext to sys/i386/include/ucontext.h.
    
    Requested by:   kib
    Reviewed by:    brooks, imp, kib
    Sponsored by:   The University of Cambridge, Google Inc.
    Differential Revision:  https://reviews.freebsd.org/D33886
---
 sys/i386/include/ucontext.h |  8 ++++++++
 sys/sys/ucontext.h          | 14 --------------
 2 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/sys/i386/include/ucontext.h b/sys/i386/include/ucontext.h
index 0b54b77ae144..292a2bb9573f 100644
--- a/sys/i386/include/ucontext.h
+++ b/sys/i386/include/ucontext.h
@@ -58,6 +58,14 @@ struct freebsd4_mcontext {
 	__register_t	mc_fpregs[28];	/* env87 + fpacc87 + u_long */
 	__register_t	__spare__[17];
 };
+
+struct freebsd4_ucontext {
+	sigset_t	uc_sigmask;
+	struct freebsd4_mcontext uc_mcontext;
+	struct freebsd4_ucontext *uc_link;
+	stack_t		uc_stack;
+	int		__spare__[8];
+};
 #endif
 
 #include <x86/ucontext.h>
diff --git a/sys/sys/ucontext.h b/sys/sys/ucontext.h
index 8da481732c09..65a331b79086 100644
--- a/sys/sys/ucontext.h
+++ b/sys/sys/ucontext.h
@@ -39,20 +39,6 @@
 
 #define	UCF_SWAPPED	0x00000001	/* Used by swapcontext(3). */
 
-#if defined(_KERNEL) && defined(COMPAT_FREEBSD4)
-#if defined(__i386__)
-struct freebsd4_ucontext {
-	sigset_t	uc_sigmask;
-	struct freebsd4_mcontext uc_mcontext;
-	struct freebsd4_ucontext *uc_link;
-	stack_t		uc_stack;
-	int		__spare__[8];
-};
-#else	/* __i386__ */
-#define freebsd4_ucontext ucontext
-#endif	/* __i386__ */
-#endif	/* _KERNEL */
-
 #ifndef _KERNEL
 
 __BEGIN_DECLS