git: 717e7fb27af9 - main - syscalls: struct ucontext4 -> struct freebsd4_ucontext

From: Brooks Davis <brooks_at_FreeBSD.org>
Date: Mon, 22 Nov 2021 22:37:22 UTC
The branch main has been updated by brooks:

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

commit 717e7fb27af9c9efc79b6efcced71eb29b058bf9
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2021-11-22 22:36:54 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2021-11-22 22:36:54 +0000

    syscalls: struct ucontext4 -> struct freebsd4_ucontext
    
    This aligns with struct freebsd4_ucontext32 in freebsd32.
    
    Reviewed by:    kib
---
 sys/i386/i386/exec_machdep.c                  | 4 ++--
 sys/i386/i386/genassym.c                      | 4 ++--
 sys/i386/include/sigframe.h                   | 2 +-
 sys/kern/syscalls.master                      | 2 +-
 sys/sys/ucontext.h                            | 6 +++---
 tools/tools/shlib-compat/makesyscalls-fake.sh | 2 +-
 6 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/sys/i386/i386/exec_machdep.c b/sys/i386/i386/exec_machdep.c
index 7d3022fbc406..469b0ebc9a78 100644
--- a/sys/i386/i386/exec_machdep.c
+++ b/sys/i386/i386/exec_machdep.c
@@ -653,9 +653,9 @@ osigreturn(struct thread *td, struct osigreturn_args *uap)
 int
 freebsd4_sigreturn(struct thread *td, struct freebsd4_sigreturn_args *uap)
 {
-	struct ucontext4 uc;
+	struct freebsd4_ucontext uc;
 	struct trapframe *regs;
-	struct ucontext4 *ucp;
+	struct freebsd4_ucontext *ucp;
 	int cs, eflags, error;
 	ksiginfo_t ksi;
 
diff --git a/sys/i386/i386/genassym.c b/sys/i386/i386/genassym.c
index c6901fc33c8f..bde452b44c95 100644
--- a/sys/i386/i386/genassym.c
+++ b/sys/i386/i386/genassym.c
@@ -171,8 +171,8 @@ ASSYM(SC_GS, offsetof(struct osigcontext, sc_gs));
 ASSYM(SC_TRAPNO, offsetof(struct osigcontext, sc_trapno));
 #endif
 #ifdef COMPAT_FREEBSD4
-ASSYM(UC4_EFLAGS, offsetof(struct ucontext4, uc_mcontext.mc_eflags));
-ASSYM(UC4_GS, offsetof(struct ucontext4, uc_mcontext.mc_gs));
+ASSYM(UC4_EFLAGS, offsetof(struct freebsd4_ucontext, uc_mcontext.mc_eflags));
+ASSYM(UC4_GS, offsetof(struct freebsd4_ucontext, uc_mcontext.mc_gs));
 #endif
 ASSYM(UC_EFLAGS, offsetof(ucontext_t, uc_mcontext.mc_eflags));
 ASSYM(UC_GS, offsetof(ucontext_t, uc_mcontext.mc_gs));
diff --git a/sys/i386/include/sigframe.h b/sys/i386/include/sigframe.h
index 922100edb3ad..0f07b998cf91 100644
--- a/sys/i386/include/sigframe.h
+++ b/sys/i386/include/sigframe.h
@@ -85,7 +85,7 @@ struct sigframe4 {
 		__siginfohandler_t	*sf_action;
 		__sighandler_t		*sf_handler;
 	} sf_ahu;
-	struct ucontext4 sf_uc;		/* = *sf_ucontext */
+	struct freebsd4_ucontext sf_uc;		/* = *sf_ucontext */
 	siginfo_t	sf_si;		/* = *sf_siginfo (SA_SIGINFO case) */
 };
 #endif
diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master
index 5f4890f422df..71c96896da2e 100644
--- a/sys/kern/syscalls.master
+++ b/sys/kern/syscalls.master
@@ -1777,7 +1777,7 @@
 	}
 344	AUE_SIGRETURN	COMPAT4|CAPENABLED {
 		int sigreturn(
-		    _In_ const struct ucontext4 *sigcntxp
+		    _In_ const struct freebsd4_ucontext *sigcntxp
 		);
 	}
 345	AUE_SIGWAIT	STD|CAPENABLED {
diff --git a/sys/sys/ucontext.h b/sys/sys/ucontext.h
index 1a1f7b7ccbdb..f86258d4b1f8 100644
--- a/sys/sys/ucontext.h
+++ b/sys/sys/ucontext.h
@@ -41,15 +41,15 @@
 
 #if defined(_KERNEL) && defined(COMPAT_FREEBSD4)
 #if defined(__i386__)
-struct ucontext4 {
+struct freebsd4_ucontext {
 	sigset_t	uc_sigmask;
 	struct mcontext4 uc_mcontext;
-	struct ucontext4 *uc_link;
+	struct freebsd4_ucontext *uc_link;
 	stack_t		uc_stack;
 	int		__spare__[8];
 };
 #else	/* __i386__ */
-#define ucontext4 ucontext
+#define freebsd4_ucontext ucontext
 #endif	/* __i386__ */
 #endif	/* _KERNEL */
 
diff --git a/tools/tools/shlib-compat/makesyscalls-fake.sh b/tools/tools/shlib-compat/makesyscalls-fake.sh
index 1d073dabb1b7..badf63b45ee5 100755
--- a/tools/tools/shlib-compat/makesyscalls-fake.sh
+++ b/tools/tools/shlib-compat/makesyscalls-fake.sh
@@ -82,7 +82,7 @@ s/\$//g
 		printf "struct msqid_ds_old;\n"
 		printf "struct shmid_ds_old;\n"
 		# TODO
-		printf "struct ucontext4;\n"
+		printf "struct freebsd4_ucontext;\n"
 		printf "struct sctp_sndrcvinfo;\n"
 		printf "\n"
 	}