Source-Changes-HG archive

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

[src/trunk]: src/sys/sys Use "stack_t" instead of "struct sigaltstack", as th...



details:   https://anonhg.NetBSD.org/src/rev/448802ab8565
branches:  trunk
changeset: 1024725:448802ab8565
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Mon Nov 01 05:07:15 2021 +0000

description:
Use "stack_t" instead of "struct sigaltstack", as the former is the
newer standardized name.  NFC.

diffstat:

 sys/arch/aarch64/aarch64/netbsd32_machdep.c     |   6 +++---
 sys/arch/aarch64/aarch64/sig_machdep.c          |   6 +++---
 sys/arch/amd64/amd64/netbsd32_machdep.c         |   6 +++---
 sys/arch/powerpc/powerpc/sig_machdep.c          |   6 +++---
 sys/arch/sh3/sh3/sh3_machdep.c                  |   6 +++---
 sys/arch/vax/vax/sig_machdep.c                  |   6 +++---
 sys/compat/common/compat_sigaltstack.h          |   4 ++--
 sys/compat/common/kern_sig_43.c                 |  14 +++++++-------
 sys/compat/linux/arch/aarch64/linux_machdep.c   |   6 +++---
 sys/compat/linux/arch/i386/linux_machdep.c      |  15 ++++++++-------
 sys/compat/linux/common/linux_signal.c          |  12 ++++++------
 sys/compat/linux/common/linux_signal.h          |   5 ++---
 sys/compat/linux32/arch/amd64/linux32_machdep.c |  14 +++++++-------
 sys/compat/linux32/common/linux32_signal.c      |   7 ++++---
 sys/compat/linux32/common/linux32_signal.h      |   4 ++--
 sys/compat/netbsd32/netbsd32_compat_43.c        |   6 +++---
 sys/compat/sys/signalvar.h                      |   6 +++---
 sys/kern/sys_sig.c                              |  11 +++++------
 sys/kern/syscalls.master                        |   7 +++----
 sys/sys/signalvar.h                             |   5 ++---
 20 files changed, 75 insertions(+), 77 deletions(-)

diffs (truncated from 631 to 300 lines):

diff -r edf73e3df1d3 -r 448802ab8565 sys/arch/aarch64/aarch64/netbsd32_machdep.c
--- a/sys/arch/aarch64/aarch64/netbsd32_machdep.c       Mon Nov 01 03:09:58 2021 +0000
+++ b/sys/arch/aarch64/aarch64/netbsd32_machdep.c       Mon Nov 01 05:07:15 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_machdep.c,v 1.20 2021/10/27 04:14:59 thorpej Exp $    */
+/*     $NetBSD: netbsd32_machdep.c,v 1.21 2021/11/01 05:07:15 thorpej Exp $    */
 
 /*
  * Copyright (c) 2018 Ryo Shimizu <ryo%nerv.org@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.20 2021/10/27 04:14:59 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.21 2021/11/01 05:07:15 thorpej Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -306,7 +306,7 @@
        struct lwp * const l = curlwp;
        struct proc * const p = l->l_proc;
        struct trapframe * const tf = lwp_trapframe(l);
-       struct sigaltstack * const ss = &l->l_sigstk;
+       stack_t * const ss = &l->l_sigstk;
        const int signo = ksi->ksi_signo;
        const struct sigaction * const sa = &SIGACTION(p, signo);
        const struct sigact_sigdesc * const sdesc =
diff -r edf73e3df1d3 -r 448802ab8565 sys/arch/aarch64/aarch64/sig_machdep.c
--- a/sys/arch/aarch64/aarch64/sig_machdep.c    Mon Nov 01 03:09:58 2021 +0000
+++ b/sys/arch/aarch64/aarch64/sig_machdep.c    Mon Nov 01 05:07:15 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sig_machdep.c,v 1.7 2021/10/27 04:14:59 thorpej Exp $ */
+/* $NetBSD: sig_machdep.c,v 1.8 2021/11/01 05:07:15 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: sig_machdep.c,v 1.7 2021/10/27 04:14:59 thorpej Exp $");
+__KERNEL_RCSID(1, "$NetBSD: sig_machdep.c,v 1.8 2021/11/01 05:07:15 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -48,7 +48,7 @@
        struct lwp * const l = curlwp;
        struct proc * const p = l->l_proc;
        struct trapframe * const tf = lwp_trapframe(l);
-       struct sigaltstack * const ss = &l->l_sigstk;
+       stack_t * const ss = &l->l_sigstk;
        const struct sigact_sigdesc * const sd =
            &p->p_sigacts->sa_sigdesc[ksi->ksi_signo];
 
diff -r edf73e3df1d3 -r 448802ab8565 sys/arch/amd64/amd64/netbsd32_machdep.c
--- a/sys/arch/amd64/amd64/netbsd32_machdep.c   Mon Nov 01 03:09:58 2021 +0000
+++ b/sys/arch/amd64/amd64/netbsd32_machdep.c   Mon Nov 01 05:07:15 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_machdep.c,v 1.138 2021/10/27 04:14:59 thorpej Exp $   */
+/*     $NetBSD: netbsd32_machdep.c,v 1.139 2021/11/01 05:07:15 thorpej Exp $   */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.138 2021/10/27 04:14:59 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.139 2021/11/01 05:07:15 thorpej Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -218,7 +218,7 @@
        const struct sigaction *sa = &SIGACTION(p, sig);
        sig_t catcher = sa->sa_handler;
        struct trapframe *tf = l->l_md.md_regs;
-       struct sigaltstack * const ss = &l->l_sigstk;
+       stack_t * const ss = &l->l_sigstk;
 
        /* Do we need to jump onto the signal stack? */
        onstack =
diff -r edf73e3df1d3 -r 448802ab8565 sys/arch/powerpc/powerpc/sig_machdep.c
--- a/sys/arch/powerpc/powerpc/sig_machdep.c    Mon Nov 01 03:09:58 2021 +0000
+++ b/sys/arch/powerpc/powerpc/sig_machdep.c    Mon Nov 01 05:07:15 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sig_machdep.c,v 1.53 2021/10/27 04:15:00 thorpej Exp $ */
+/*     $NetBSD: sig_machdep.c,v 1.54 2021/11/01 05:07:15 thorpej Exp $ */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sig_machdep.c,v 1.53 2021/10/27 04:15:00 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sig_machdep.c,v 1.54 2021/11/01 05:07:15 thorpej Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_altivec.h"
@@ -63,7 +63,7 @@
        struct lwp * const l = curlwp;
        struct proc * const p = l->l_proc;
        struct trapframe * const tf = l->l_md.md_utf;
-       struct sigaltstack * const ss = &l->l_sigstk;
+       stack_t * const ss = &l->l_sigstk;
        const struct sigact_sigdesc * const sd =
            &p->p_sigacts->sa_sigdesc[ksi->ksi_signo];
        /* save handler before sendsig_reset trashes it! */
diff -r edf73e3df1d3 -r 448802ab8565 sys/arch/sh3/sh3/sh3_machdep.c
--- a/sys/arch/sh3/sh3/sh3_machdep.c    Mon Nov 01 03:09:58 2021 +0000
+++ b/sys/arch/sh3/sh3/sh3_machdep.c    Mon Nov 01 05:07:15 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sh3_machdep.c,v 1.110 2020/06/11 19:20:45 ad Exp $     */
+/*     $NetBSD: sh3_machdep.c,v 1.111 2021/11/01 05:07:16 thorpej Exp $        */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2002 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sh3_machdep.c,v 1.110 2020/06/11 19:20:45 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sh3_machdep.c,v 1.111 2021/11/01 05:07:16 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -334,7 +334,7 @@
 getframe(const struct lwp *l, int sig, int *onstack)
 {
        const struct proc *p = l->l_proc;
-       const struct sigaltstack *sigstk= &l->l_sigstk;
+       const stack_t *sigstk = &l->l_sigstk;
 
        /* Do we need to jump onto the signal stack? */
        *onstack = (sigstk->ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0
diff -r edf73e3df1d3 -r 448802ab8565 sys/arch/vax/vax/sig_machdep.c
--- a/sys/arch/vax/vax/sig_machdep.c    Mon Nov 01 03:09:58 2021 +0000
+++ b/sys/arch/vax/vax/sig_machdep.c    Mon Nov 01 05:07:15 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sig_machdep.c,v 1.25 2021/10/27 04:15:00 thorpej Exp $      */
+/* $NetBSD: sig_machdep.c,v 1.26 2021/11/01 05:07:16 thorpej Exp $      */
 
 /*
  * Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@@ -79,7 +79,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sig_machdep.c,v 1.25 2021/10/27 04:15:00 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sig_machdep.c,v 1.26 2021/11/01 05:07:16 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_compat_netbsd.h"
@@ -195,7 +195,7 @@
        struct lwp * const l = curlwp;
        struct proc * const p = l->l_proc;
        struct trapframe * const tf = l->l_md.md_utf;
-       struct sigaltstack * const ss = &l->l_sigstk;
+       stack_t * const ss = &l->l_sigstk;
        const struct sigact_sigdesc * const sd =
            &p->p_sigacts->sa_sigdesc[ksi->ksi_signo];
        vaddr_t sp;
diff -r edf73e3df1d3 -r 448802ab8565 sys/compat/common/compat_sigaltstack.h
--- a/sys/compat/common/compat_sigaltstack.h    Mon Nov 01 03:09:58 2021 +0000
+++ b/sys/compat/common/compat_sigaltstack.h    Mon Nov 01 05:07:15 2021 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: compat_sigaltstack.h,v 1.3 2011/06/05 09:37:10 dsl Exp $        */
+/*      $NetBSD: compat_sigaltstack.h,v 1.4 2021/11/01 05:07:16 thorpej Exp $        */
 
 /* Wrapper for calling sigaltstack1() from compat (or other) code */
 
@@ -17,7 +17,7 @@
 
 #define compat_sigaltstack(uap, compat_ss, ss_onstack, ss_disable) do { \
        struct compat_ss css; \
-       struct sigaltstack nss, oss; \
+       stack_t nss, oss; \
        int error; \
 \
        if (SCARG_COMPAT_PTR(uap, nss)) { \
diff -r edf73e3df1d3 -r 448802ab8565 sys/compat/common/kern_sig_43.c
--- a/sys/compat/common/kern_sig_43.c   Mon Nov 01 03:09:58 2021 +0000
+++ b/sys/compat/common/kern_sig_43.c   Mon Nov 01 05:07:15 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_sig_43.c,v 1.37 2021/09/07 11:43:02 riastradh Exp $       */
+/*     $NetBSD: kern_sig_43.c,v 1.38 2021/11/01 05:07:16 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_sig_43.c,v 1.37 2021/09/07 11:43:02 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sig_43.c,v 1.38 2021/11/01 05:07:16 thorpej Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -70,8 +70,8 @@
 void compat_43_sigset_to_sigmask(const sigset_t *, int *);
 void compat_43_sigvec_to_sigaction(const struct sigvec *, struct sigaction *);
 void compat_43_sigaction_to_sigvec(const struct sigaction *, struct sigvec *);
-void compat_43_sigstack_to_sigaltstack(const struct sigstack *, struct sigaltstack *);
-void compat_43_sigaltstack_to_sigstack(const struct sigaltstack *, struct sigstack *);
+void compat_43_sigstack_to_sigaltstack(const struct sigstack *, stack_t *);
+void compat_43_sigaltstack_to_sigstack(const stack_t *, struct sigstack *);
 
 static struct syscall_package kern_sig_43_syscalls[] = {
        { SYS_compat_43_osigblock, 0, (sy_call_t *)compat_43_sys_sigblock },
@@ -121,7 +121,7 @@
 }
 
 void
-compat_43_sigstack_to_sigaltstack(const struct sigstack *ss, struct sigaltstack *sa)
+compat_43_sigstack_to_sigaltstack(const struct sigstack *ss, stack_t *sa)
 {
        memset(sa, 0, sizeof(*sa));
        sa->ss_sp = ss->ss_sp;
@@ -132,7 +132,7 @@
 }
 
 void
-compat_43_sigaltstack_to_sigstack(const struct sigaltstack *sa, struct sigstack *ss)
+compat_43_sigaltstack_to_sigstack(const stack_t *sa, struct sigstack *ss)
 {
        memset(ss, 0, sizeof(*ss));
        ss->ss_sp = sa->ss_sp;
@@ -197,7 +197,7 @@
                syscallarg(struct sigstack *) oss;
        } */
        struct sigstack nss, oss;
-       struct sigaltstack nsa, osa;
+       stack_t nsa, osa;
        int error;
 
        if (SCARG(uap, nss)) {
diff -r edf73e3df1d3 -r 448802ab8565 sys/compat/linux/arch/aarch64/linux_machdep.c
--- a/sys/compat/linux/arch/aarch64/linux_machdep.c     Mon Nov 01 03:09:58 2021 +0000
+++ b/sys/compat/linux/arch/aarch64/linux_machdep.c     Mon Nov 01 05:07:15 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_machdep.c,v 1.2 2021/10/09 07:01:34 ryo Exp $    */
+/*     $NetBSD: linux_machdep.c,v 1.3 2021/11/01 05:07:16 thorpej Exp $        */
 
 /*-
  * Copyright (c) 2021 Ryo Shimizu <ryo%nerv.org@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.2 2021/10/09 07:01:34 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.3 2021/11/01 05:07:16 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -133,7 +133,7 @@
        struct lwp * const l = curlwp;
        struct proc * const p = l->l_proc;
        struct trapframe * const tf = lwp_trapframe(l);
-       struct sigaltstack * const ss = &l->l_sigstk;
+       stack_t * const ss = &l->l_sigstk;
        const int sig = ksi->ksi_signo;
        const sig_t handler = SIGACTION(p, sig).sa_handler;
        struct linux_rt_sigframe *u_sigframe, *tmp_sigframe;
diff -r edf73e3df1d3 -r 448802ab8565 sys/compat/linux/arch/i386/linux_machdep.c
--- a/sys/compat/linux/arch/i386/linux_machdep.c        Mon Nov 01 03:09:58 2021 +0000
+++ b/sys/compat/linux/arch/i386/linux_machdep.c        Mon Nov 01 05:07:15 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_machdep.c,v 1.168 2021/09/07 11:43:04 riastradh Exp $    */
+/*     $NetBSD: linux_machdep.c,v 1.169 2021/11/01 05:07:16 thorpej Exp $      */
 
 /*-
  * Copyright (c) 1995, 2000, 2008, 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.168 2021/09/07 11:43:04 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.169 2021/11/01 05:07:16 thorpej Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_user_ldt.h"
@@ -109,7 +109,7 @@
 
 static struct biosdisk_info *fd2biosinfo(struct proc *, struct file *);
 static void linux_save_ucontext(struct lwp *, struct trapframe *,
-    const sigset_t *, struct sigaltstack *, struct linux_ucontext *);
+    const sigset_t *, stack_t *, struct linux_ucontext *);
 static void linux_save_sigcontext(struct lwp *, struct trapframe *,
     const sigset_t *, struct linux_sigcontext *);
 static int linux_restore_sigcontext(struct lwp *,
@@ -175,7 +175,8 @@
 
 
 static void
-linux_save_ucontext(struct lwp *l, struct trapframe *tf, const sigset_t *mask, struct sigaltstack *sas, struct linux_ucontext *uc)
+linux_save_ucontext(struct lwp *l, struct trapframe *tf, const sigset_t *mask,
+    stack_t *sas, struct linux_ucontext *uc)
 {
        uc->uc_flags = 0;
        uc->uc_link = NULL;



Home | Main Index | Thread Index | Old Index