diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2002-07-20 19:24:58 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2002-07-20 19:24:58 +0000 |
commit | e4a211bbec694bd8f760b505efa05e164a04da1b (patch) | |
tree | b37670277517419a042dee847a6f840ac7430b7f /sys/arch/m68k | |
parent | 09b17f5dab5c4c6d73c813f334ed5cb1d9c679aa (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/m68k')
-rw-r--r-- | sys/arch/m68k/m68k/sig_machdep.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/arch/m68k/m68k/sig_machdep.c b/sys/arch/m68k/m68k/sig_machdep.c index e0555f3a5ef..9570ba4a9b1 100644 --- a/sys/arch/m68k/m68k/sig_machdep.c +++ b/sys/arch/m68k/m68k/sig_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sig_machdep.c,v 1.9 2002/06/04 00:09:08 deraadt Exp $ */ +/* $OpenBSD: sig_machdep.c,v 1.10 2002/07/20 19:24:56 art Exp $ */ /* $NetBSD: sig_machdep.c,v 1.3 1997/04/30 23:28:03 gwr Exp $ */ /* @@ -145,7 +145,6 @@ sendsig(catcher, sig, mask, code, type, val) register struct sigacts *psp = p->p_sigacts; register short ft; int oonstack, fsize; - extern char sigcode[], esigcode[]; frame = (struct frame *)p->p_md.md_regs; ft = frame->f_format; @@ -276,7 +275,7 @@ 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 ((sigdebug & SDB_KSTACK) && p->p_pid == sigpid) printf("sendsig(%d): sig %d returns\n", |