summaryrefslogtreecommitdiff
path: root/sys/arch/hp300
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2002-07-20 19:24:58 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2002-07-20 19:24:58 +0000
commite4a211bbec694bd8f760b505efa05e164a04da1b (patch)
treeb37670277517419a042dee847a6f840ac7430b7f /sys/arch/hp300
parent09b17f5dab5c4c6d73c813f334ed5cb1d9c679aa (diff)
Instead of copying out the signal trampoline on top of the stack, create
an uvm aobj, copy out the signal trampoline into it and share that page among all processes for the same emulation. This also requires us to actually be able to tell signal code where the trampoline is located, so introduce a new field in struct proc - p_sigcode that is a pointer to sigcode. This allows us to remove all the ugly calculations of the signal trampoline address done in every sendsig function in the tree (that's why so many files are changed). Tested by various people. ok deraadt@
Diffstat (limited to 'sys/arch/hp300')
-rw-r--r--sys/arch/hp300/hp300/hpux_machdep.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/arch/hp300/hp300/hpux_machdep.c b/sys/arch/hp300/hp300/hpux_machdep.c
index 1f8794c721d..5e149e4f318 100644
--- a/sys/arch/hp300/hp300/hpux_machdep.c
+++ b/sys/arch/hp300/hp300/hpux_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hpux_machdep.c,v 1.12 2002/06/04 00:09:08 deraadt Exp $ */
+/* $OpenBSD: hpux_machdep.c,v 1.13 2002/07/20 19:24:55 art Exp $ */
/* $NetBSD: hpux_machdep.c,v 1.19 1998/02/16 20:58:30 thorpej Exp $ */
/*
@@ -391,7 +391,6 @@ hpux_sendsig(catcher, sig, mask, code, type, val)
struct sigacts *psp = p->p_sigacts;
short ft;
int oonstack, fsize;
- extern char sigcode[], esigcode[];
frame = (struct frame *)p->p_md.md_regs;
ft = frame->f_format;
@@ -531,7 +530,7 @@ hpux_sendsig(catcher, sig, mask, code, type, val)
/*
* Signal trampoline code is at base of user stack.
*/
- frame->f_pc = (int)PS_STRINGS - (esigcode - sigcode);
+ frame->f_pc = p->p_sigcode;
#ifdef DEBUG
if ((hpuxsigdebug & SDB_KSTACK) && p->p_pid == hpuxsigpid)
printf("hpux_sendsig(%d): sig %d returns\n",