summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2006-07-19 20:41:34 +0000
committermiod <miod@openbsd.org>2006-07-19 20:41:34 +0000
commit7621fd6323ea1ce2b1de91cd5488d7eb93e28d29 (patch)
treea45828d5997428d5d796a6ee5c35a64d1c7300e8
parentTrivial simplification in the signal delivery code; shave one instruction (diff)
downloadwireguard-openbsd-7621fd6323ea1ce2b1de91cd5488d7eb93e28d29.tar.xz
wireguard-openbsd-7621fd6323ea1ce2b1de91cd5488d7eb93e28d29.zip
Actually we can optimize further an assignment in sendsig().
-rw-r--r--sys/arch/vax/vax/machdep.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/arch/vax/vax/machdep.c b/sys/arch/vax/vax/machdep.c
index 74cc151a835..1ae3f85ec82 100644
--- a/sys/arch/vax/vax/machdep.c
+++ b/sys/arch/vax/vax/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.82 2006/07/19 20:38:33 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.83 2006/07/19 20:41:34 miod Exp $ */
/* $NetBSD: machdep.c,v 1.108 2000/09/13 15:00:23 thorpej Exp $ */
/*
@@ -473,13 +473,6 @@ sendsig(catcher, sig, mask, code, type, val)
/* Set up positions for structs on stack */
sigf = (struct sigframe *) (cursp - sizeof(struct sigframe));
- /*
- * Place sp at the beginning of sigf; this ensures that possible
- * further calls to sendsig won't overwrite this struct
- * sigframe/struct sigcontext pair with their own.
- */
- cursp = (unsigned) sigf;
-
bzero(&gsigf, sizeof gsigf);
gsigf.sf_arg = (register_t)&sigf->sf_sc;
gsigf.sf_pc = (register_t)catcher;
@@ -508,6 +501,11 @@ sendsig(catcher, sig, mask, code, type, val)
syscf->pc = p->p_sigcode;
syscf->psl = PSL_U | PSL_PREVU;
+ /*
+ * Place sp at the beginning of sigf; this ensures that possible
+ * further calls to sendsig won't overwrite this struct
+ * sigframe/struct sigcontext pair with their own.
+ */
syscf->sp = syscf->ap =
(unsigned) sigf + offsetof(struct sigframe, sf_pc);