summaryrefslogtreecommitdiff
path: root/sys/arch/vax/include
diff options
context:
space:
mode:
authorPhilip Guenthe <guenther@cvs.openbsd.org>2012-12-02 07:03:33 +0000
committerPhilip Guenthe <guenther@cvs.openbsd.org>2012-12-02 07:03:33 +0000
commit15c7623306062239f832ef81bd0bdfc804b4d186 (patch)
treed4c341f7fa4f162d4c4cd1ede1db5c9089f0afb6 /sys/arch/vax/include
parentb02dfe0ab7aae6700f0c15419373891118eab134 (diff)
Determine whether we're currently on the alternative signal stack
dynamically, by comparing the stack pointer against the altstack base and size, so that you get the correct answer if you longjmp out of the signal handler, as tested by regress/sys/kern/stackjmp/. Also, fix alt stack handling on vax, where it was completely broken. Testing and corrections by miod@, krw@, tobiasu@, pirofti@
Diffstat (limited to 'sys/arch/vax/include')
-rw-r--r--sys/arch/vax/include/cpu.h3
-rw-r--r--sys/arch/vax/include/signal.h4
2 files changed, 4 insertions, 3 deletions
diff --git a/sys/arch/vax/include/cpu.h b/sys/arch/vax/include/cpu.h
index d16676d7ad5..aa30873fdd4 100644
--- a/sys/arch/vax/include/cpu.h
+++ b/sys/arch/vax/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.40 2011/09/15 00:48:24 miod Exp $ */
+/* $OpenBSD: cpu.h,v 1.41 2012/12/02 07:03:31 guenther Exp $ */
/* $NetBSD: cpu.h,v 1.41 1999/10/21 20:01:36 ragge Exp $ */
/*
@@ -123,6 +123,7 @@ extern int want_resched; /* resched() was called */
* This is used during profiling to integrate system time.
*/
#define PROC_PC(p) (((struct trapframe *)((p)->p_addr->u_pcb.framep))->pc)
+#define PROC_STACK(p) (((struct trapframe *)((p)->p_addr->u_pcb.framep))->sp)
/*
* Give a profiling tick to the current process when the user profiling
diff --git a/sys/arch/vax/include/signal.h b/sys/arch/vax/include/signal.h
index 65f8a520838..59f306b9887 100644
--- a/sys/arch/vax/include/signal.h
+++ b/sys/arch/vax/include/signal.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: signal.h,v 1.7 2011/03/23 16:54:37 pirofti Exp $ */
+/* $OpenBSD: signal.h,v 1.8 2012/12/02 07:03:31 guenther Exp $ */
/* $NetBSD: signal.h,v 1.4 1995/01/10 19:01:52 jtc Exp $ */
/*
@@ -50,7 +50,7 @@ typedef int sig_atomic_t;
* a non-standard exit is performed.
*/
struct sigcontext {
- int sc_onstack; /* sigstack state to restore */
+ int __sc_unused;
int sc_mask; /* signal mask to restore */
int sc_sp; /* sp to restore */
int sc_fp; /* fp to restore */