summaryrefslogtreecommitdiffstats
path: root/sys/alpha/linux/linux_sysvec.c
diff options
context:
space:
mode:
authorluoqi <luoqi@FreeBSD.org>1999-10-11 20:33:17 +0000
committerluoqi <luoqi@FreeBSD.org>1999-10-11 20:33:17 +0000
commitfd8b4427a5a052988cfb0778b779cff1a3e09628 (patch)
tree7cad9d7dad8a4c0a9a157153dada2dbbd270e491 /sys/alpha/linux/linux_sysvec.c
parent031a7ae6a88dcce6c4d95badfd6b19cbe5520d38 (diff)
downloadFreeBSD-src-fd8b4427a5a052988cfb0778b779cff1a3e09628.zip
FreeBSD-src-fd8b4427a5a052988cfb0778b779cff1a3e09628.tar.gz
Add a per-signal flag to mark handlers registered with osigaction, so we
can provide the correct context to each signal handler. Fix broken sigsuspend(): don't use p_oldsigmask as a flag, use SAS_OLDMASK as we did before the linuxthreads support merge (submitted by bde). Move ps_sigstk from to p_sigacts to the main proc structure since signal stack should not be shared among threads. Move SAS_OLDMASK and SAS_ALTSTACK flags from sigacts::ps_flags to proc::p_flag. Move PS_NOCLDSTOP and PS_NOCLDWAIT flags from proc::p_flag to procsig::ps_flag. Reviewed by: marcel, jdp, bde
Diffstat (limited to 'sys/alpha/linux/linux_sysvec.c')
-rw-r--r--sys/alpha/linux/linux_sysvec.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/sys/alpha/linux/linux_sysvec.c b/sys/alpha/linux/linux_sysvec.c
index ecaa359..d282439 100644
--- a/sys/alpha/linux/linux_sysvec.c
+++ b/sys/alpha/linux/linux_sysvec.c
@@ -198,7 +198,7 @@ linux_sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
int oonstack;
regs = p->p_md.md_regs;
- oonstack = psp->ps_sigstk.ss_flags & SS_ONSTACK;
+ oonstack = p->p_sigstk.ss_flags & SS_ONSTACK;
#ifdef DEBUG
printf("Linux-emul(%ld): linux_sendsig(%p, %d, %p, %lu)\n",
@@ -207,11 +207,11 @@ linux_sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
/*
* Allocate space for the signal handler context.
*/
- if ((psp->ps_flags & SAS_ALTSTACK) && !oonstack &&
+ if ((p->p_flag & P_ALTSTACK) && !oonstack &&
SIGISMEMBER(psp->ps_sigonstack, sig)) {
- fp = (struct linux_sigframe *)(psp->ps_sigstk.ss_sp +
- psp->ps_sigstk.ss_size - sizeof(struct linux_sigframe));
- psp->ps_sigstk.ss_flags |= SS_ONSTACK;
+ fp = (struct linux_sigframe *)(p->p_sigstk.ss_sp +
+ p->p_sigstk.ss_size - sizeof(struct linux_sigframe));
+ p->p_sigstk.ss_flags |= SS_ONSTACK;
} else {
fp = (struct linux_sigframe *)regs->tf_esp - 1;
}
@@ -287,6 +287,7 @@ linux_sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
regs->tf_ds = _udatasel;
regs->tf_es = _udatasel;
regs->tf_fs = _udatasel;
+ load_gs(_udatasel);
regs->tf_ss = _udatasel;
}
@@ -354,12 +355,9 @@ linux_sigreturn(p, args)
return(EINVAL);
}
- p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
- SIGEMPTYSET(p->p_sigmask);
- p->p_sigmask.__bits[0] = context.sc_mask;
- SIGDELSET(p->p_sigmask, SIGKILL);
- SIGDELSET(p->p_sigmask, SIGCONT);
- SIGDELSET(p->p_sigmask, SIGSTOP);
+ p->p_sigstk.ss_flags &= ~SS_ONSTACK;
+ SIGSETOLD(p->p_sigmask, context.sc_mask);
+ SIG_CANTMASK(p->p_sigmask);
/*
* Restore signal context.
OpenPOWER on IntegriCloud