Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/compat/linux/common Use __SIGTRAMP_SIGCODE_VERSION rathe...



details:   https://anonhg.NetBSD.org/src/rev/45337283ddcb
branches:  trunk
changeset: 1024531:45337283ddcb
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Wed Oct 27 16:40:04 2021 +0000

description:
Use __SIGTRAMP_SIGCODE_VERSION rather than hard-coding 0.

diffstat:

 sys/compat/linux/arch/amd64/linux_machdep.c |  6 +++---
 sys/compat/linux/common/linux_signal.c      |  6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diffs (54 lines):

diff -r 864a2c4f8272 -r 45337283ddcb sys/compat/linux/arch/amd64/linux_machdep.c
--- a/sys/compat/linux/arch/amd64/linux_machdep.c       Wed Oct 27 14:53:12 2021 +0000
+++ b/sys/compat/linux/arch/amd64/linux_machdep.c       Wed Oct 27 16:40:04 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_machdep.c,v 1.60 2021/09/07 11:43:03 riastradh Exp $ */
+/*     $NetBSD: linux_machdep.c,v 1.61 2021/10/27 16:40:04 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2005 Emmanuel Dreyfus, all rights reserved.
@@ -33,7 +33,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.60 2021/09/07 11:43:03 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.61 2021/10/27 16:40:04 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -167,7 +167,7 @@
        sfp = (struct linux_rt_sigframe *)sp;
 
        memset(&sigframe, 0, sizeof(sigframe));
-       if (ps->sa_sigdesc[sig].sd_vers != 0)
+       if (ps->sa_sigdesc[sig].sd_vers != __SIGTRAMP_SIGCODE_VERSION)
                sigframe.pretcode = 
                    (char *)(u_long)ps->sa_sigdesc[sig].sd_tramp;
        else
diff -r 864a2c4f8272 -r 45337283ddcb sys/compat/linux/common/linux_signal.c
--- a/sys/compat/linux/common/linux_signal.c    Wed Oct 27 14:53:12 2021 +0000
+++ b/sys/compat/linux/common/linux_signal.c    Wed Oct 27 16:40:04 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_signal.c,v 1.86 2021/09/23 06:56:27 ryo Exp $    */
+/*     $NetBSD: linux_signal.c,v 1.87 2021/10/27 16:40:05 thorpej Exp $        */
 
 /*-
  * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -48,7 +48,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_signal.c,v 1.86 2021/09/23 06:56:27 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_signal.c,v 1.87 2021/10/27 16:40:05 thorpej Exp $");
 
 #define COMPAT_LINUX 1
 
@@ -391,7 +391,7 @@
                native_to_linux_sigaction(&olsa, &obsa);
 
 #ifdef LINUX_SA_RESTORER
-               if (ps->sa_sigdesc[sig].sd_vers != 0) {
+               if (ps->sa_sigdesc[sig].sd_vers != __SIGTRAMP_SIGCODE_VERSION) {
                        olsa.linux_sa_restorer = ps->sa_sigdesc[sig].sd_tramp;
                        olsa.linux_sa_flags |= LINUX_SA_RESTORER;
                }



Home | Main Index | Thread Index | Old Index