diff options
author | Philip Guenthe <guenther@cvs.openbsd.org> | 2012-12-02 07:03:33 +0000 |
---|---|---|
committer | Philip Guenthe <guenther@cvs.openbsd.org> | 2012-12-02 07:03:33 +0000 |
commit | 15c7623306062239f832ef81bd0bdfc804b4d186 (patch) | |
tree | d4c341f7fa4f162d4c4cd1ede1db5c9089f0afb6 /sys/arch/sparc64/include/cpu.h | |
parent | b02dfe0ab7aae6700f0c15419373891118eab134 (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/sparc64/include/cpu.h')
-rw-r--r-- | sys/arch/sparc64/include/cpu.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/arch/sparc64/include/cpu.h b/sys/arch/sparc64/include/cpu.h index 0ef44b2932f..0ca59053ace 100644 --- a/sys/arch/sparc64/include/cpu.h +++ b/sys/arch/sparc64/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.78 2011/07/06 22:26:44 kettenis Exp $ */ +/* $OpenBSD: cpu.h,v 1.79 2012/12/02 07:03:31 guenther Exp $ */ /* $NetBSD: cpu.h,v 1.28 2001/06/14 22:56:58 thorpej Exp $ */ /* @@ -238,6 +238,7 @@ extern void need_resched(struct cpu_info *); * This is used during profiling to integrate system time. */ #define PROC_PC(p) ((p)->p_md.md_tf->tf_pc) +#define PROC_STACK(p) ((p)->p_md.md_tf->tf_out[6] + (2048-1)) /* BIAS */ /* * Give a profiling tick to the current process when the user profiling |