Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mips/include Adjust the rules for sigcontext visibi...
details: https://anonhg.NetBSD.org/src/rev/e45bf059fd4d
branches: trunk
changeset: 990578:e45bf059fd4d
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sat Oct 30 14:05:40 2021 +0000
description:
Adjust the rules for sigcontext visibility on MIPS:
- Define __HAVE_STRUCT_SIGCONTEXT if _KERNEL (because it's needed for
32-bit binary compatibility) or if the O32 ABI is active (because
that's the only ABI that ever used sigcontext for signal delivery).
- For _KERNEL, define a "struct sigcontext" suitable only for 32-bit
compatible signal delivery.
- For userspace, define a "struct sigcontext" appropriate for any ABI
if _LIBC is defined (it's used for setjmp / longjmp) or if O32 is
the active ABI (because it was part of the old BSD signal API).
diffstat:
sys/arch/mips/include/signal.h | 22 ++++++++++++----------
1 files changed, 12 insertions(+), 10 deletions(-)
diffs (49 lines):
diff -r dbb2f5fc8bd6 -r e45bf059fd4d sys/arch/mips/include/signal.h
--- a/sys/arch/mips/include/signal.h Sat Oct 30 13:50:12 2021 +0000
+++ b/sys/arch/mips/include/signal.h Sat Oct 30 14:05:40 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: signal.h,v 1.32 2021/10/27 02:00:46 thorpej Exp $ */
+/* $NetBSD: signal.h,v 1.33 2021/10/30 14:05:40 thorpej Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -78,8 +78,12 @@
};
#endif /* _KERNEL && COMPAT_13 */
-#if defined(_LIBC) || (defined(_KERNEL) && (defined(COMPAT_16) || defined(COMPAT_ULTRIX)))
+#if defined(_KERNEL) || defined(__mips_o32)
#define __HAVE_STRUCT_SIGCONTEXT
+#endif
+
+#if defined(_NETBSD_SOURCE)
+#include <sys/sigtypes.h>
/*
* Only need an O32 version.
*/
@@ -98,19 +102,17 @@
}
/*
- * These will be identical in O32
+ * The only binaries that used sigcontext used the O32 ABI. The kernel
+ * needs this for 32-bit compatibility, and O32 ABI user-space needs this
+ * natively.
*/
-#ifdef _KERNEL
-/*
- * We need this only compatibility.
- */
+#if defined(_KERNEL)
_SIGCONTEXT_DEFINE(sigcontext, int, int);
-#endif
-#ifdef _LIBC
+#elif defined(__mips_o32) || defined(_LIBC)
_SIGCONTEXT_DEFINE(sigcontext, __register_t, __fpregister_t);
#endif
-#endif /* _LIBC || _KERNEL */
+#endif /* _NETBSD_SOURCE */
#endif /* !_LANGUAGE_ASSEMBLY */
#endif /* !_MIPS_SIGNAL_H_ */
Home |
Main Index |
Thread Index |
Old Index