Module Name: src
Committed By: christos
Date: Thu Apr 23 16:16:15 UTC 2020
Modified Files:
src/sys/arch/amd64/amd64: netbsd32_machdep.c
Log Message:
use shortcut variables for readability.
To generate a diff of this commit:
cvs rdiff -u -r1.133 -r1.134 src/sys/arch/amd64/amd64/netbsd32_machdep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/amd64/amd64/netbsd32_machdep.c
diff -u src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.133 src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.134
--- src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.133 Wed Dec 11 21:15:42 2019
+++ src/sys/arch/amd64/amd64/netbsd32_machdep.c Thu Apr 23 12:16:14 2020
@@ -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 @@ netbsd32_sendsig_siginfo(const ksiginfo_
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 @@ netbsd32_sendsig_siginfo(const ksiginfo_
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);