Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/amd64/amd64 use shortcut variables for readability.



details:   https://anonhg.NetBSD.org/src/rev/e5ec81afd583
branches:  trunk
changeset: 971421:e5ec81afd583
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Apr 23 16:16:14 2020 +0000

description:
use shortcut variables for readability.

diffstat:

 sys/arch/amd64/amd64/netbsd32_machdep.c |  16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diffs (52 lines):

diff -r 13744e0a1f1e -r e5ec81afd583 sys/arch/amd64/amd64/netbsd32_machdep.c
--- a/sys/arch/amd64/amd64/netbsd32_machdep.c   Thu Apr 23 16:05:15 2020 +0000
+++ b/sys/arch/amd64/amd64/netbsd32_machdep.c   Thu Apr 23 16:16:14 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_machdep.c,v 1.133 2019/12/12 02:15:42 pgoyette Exp $  */
+/*     $NetBSD: netbsd32_machdep.c,v 1.134 2020/04/23 16:16:14 christos Exp $  */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.133 2019/12/12 02:15:42 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.134 2020/04/23 16:16:14 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -214,18 +214,20 @@
        int onstack, error;
        int sig = ksi->ksi_signo;
        struct netbsd32_sigframe_siginfo *fp, frame;
-       sig_t catcher = SIGACTION(p, sig).sa_handler;
+       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;
 
        /* Do we need to jump onto the signal stack? */
        onstack =
-           (l->l_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
-           (SIGACTION(p, sig).sa_flags & SA_ONSTACK) != 0;
+           (ss->ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
+           (sa->sa_flags & SA_ONSTACK) != 0;
 
        /* Allocate space for the signal handler context. */
        if (onstack)
                fp = (struct netbsd32_sigframe_siginfo *)
-                   ((char *)l->l_sigstk.ss_sp + l->l_sigstk.ss_size);
+                   ((char *)ss->ss_sp + ss->ss_size);
        else
                fp = (struct netbsd32_sigframe_siginfo *)tf->tf_rsp;
 
@@ -252,7 +254,7 @@
        frame.sf_uc.uc_flags = _UC_SIGMASK;
        frame.sf_uc.uc_sigmask = *mask;
        frame.sf_uc.uc_link = (uint32_t)(uintptr_t)l->l_ctxlink;
-       frame.sf_uc.uc_flags |= (l->l_sigstk.ss_flags & SS_ONSTACK)
+       frame.sf_uc.uc_flags |= (ss->ss_flags & SS_ONSTACK)
            ? _UC_SETSTACK : _UC_CLRSTACK;
        sendsig_reset(l, sig);
 



Home | Main Index | Thread Index | Old Index