summaryrefslogtreecommitdiff
path: root/sys/arch/mips64/include/cpu.h
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/mips64/include/cpu.h
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/mips64/include/cpu.h')
-rw-r--r--sys/arch/mips64/include/cpu.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/arch/mips64/include/cpu.h b/sys/arch/mips64/include/cpu.h
index f562c1f8091..daa8d49dd63 100644
--- a/sys/arch/mips64/include/cpu.h
+++ b/sys/arch/mips64/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.90 2012/10/03 11:18:23 miod Exp $ */
+/* $OpenBSD: cpu.h,v 1.91 2012/12/02 07:03:31 guenther Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -268,6 +268,7 @@ void cp0_calibrate(struct cpu_info *);
* This is used during profiling to integrate system time.
*/
#define PROC_PC(p) ((p)->p_md.md_regs->pc)
+#define PROC_STACK(p) ((p)->p_md.md_regs->sp)
/*
* Preempt the current process if in interrupt from user mode,