summaryrefslogtreecommitdiffstats
path: root/sys/pc98/i386/machdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/pc98/i386/machdep.c')
-rw-r--r--sys/pc98/i386/machdep.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c
index b9013a2..4797ae1 100644
--- a/sys/pc98/i386/machdep.c
+++ b/sys/pc98/i386/machdep.c
@@ -315,6 +315,7 @@ osendsig(catcher, sig, mask, code)
p = td->td_proc;
PROC_LOCK_ASSERT(p, MA_OWNED);
psp = p->p_sigacts;
+ mtx_assert(&psp->ps_mtx, MA_OWNED);
regs = td->td_frame;
oonstack = sigonstack(regs->tf_esp);
@@ -328,7 +329,6 @@ osendsig(catcher, sig, mask, code)
#endif
} else
fp = (struct osigframe *)regs->tf_esp - 1;
- PROC_UNLOCK(p);
/* Translate the signal if appropriate. */
if (p->p_sysent->sv_sigtbl && sig <= p->p_sysent->sv_sigsize)
@@ -337,8 +337,7 @@ osendsig(catcher, sig, mask, code)
/* Build the argument list for the signal handler. */
sf.sf_signum = sig;
sf.sf_scp = (register_t)&fp->sf_siginfo.si_sc;
- PROC_LOCK(p);
- if (SIGISMEMBER(p->p_sigacts->ps_siginfo, sig)) {
+ if (SIGISMEMBER(psp->ps_siginfo, sig)) {
/* Signal handler installed with SA_SIGINFO. */
sf.sf_arg2 = (register_t)&fp->sf_siginfo;
sf.sf_siginfo.si_signo = sig;
@@ -350,6 +349,7 @@ osendsig(catcher, sig, mask, code)
sf.sf_addr = regs->tf_err;
sf.sf_ahu.sf_handler = catcher;
}
+ mtx_unlock(&psp->ps_mtx);
PROC_UNLOCK(p);
/* Save most if not all of trap frame. */
@@ -422,6 +422,7 @@ osendsig(catcher, sig, mask, code)
load_gs(_udatasel);
regs->tf_ss = _udatasel;
PROC_LOCK(p);
+ mtx_lock(&psp->ps_mtx);
}
#endif /* COMPAT_43 */
@@ -444,6 +445,7 @@ freebsd4_sendsig(catcher, sig, mask, code)
p = td->td_proc;
PROC_LOCK_ASSERT(p, MA_OWNED);
psp = p->p_sigacts;
+ mtx_assert(&psp->ps_mtx, MA_OWNED);
regs = td->td_frame;
oonstack = sigonstack(regs->tf_esp);
@@ -467,7 +469,6 @@ freebsd4_sendsig(catcher, sig, mask, code)
#endif
} else
sfp = (struct sigframe4 *)regs->tf_esp - 1;
- PROC_UNLOCK(p);
/* Translate the signal if appropriate. */
if (p->p_sysent->sv_sigtbl && sig <= p->p_sysent->sv_sigsize)
@@ -476,8 +477,7 @@ freebsd4_sendsig(catcher, sig, mask, code)
/* Build the argument list for the signal handler. */
sf.sf_signum = sig;
sf.sf_ucontext = (register_t)&sfp->sf_uc;
- PROC_LOCK(p);
- if (SIGISMEMBER(p->p_sigacts->ps_siginfo, sig)) {
+ if (SIGISMEMBER(psp->ps_siginfo, sig)) {
/* Signal handler installed with SA_SIGINFO. */
sf.sf_siginfo = (register_t)&sfp->sf_si;
sf.sf_ahu.sf_action = (__siginfohandler_t *)catcher;
@@ -492,6 +492,7 @@ freebsd4_sendsig(catcher, sig, mask, code)
sf.sf_addr = regs->tf_err;
sf.sf_ahu.sf_handler = catcher;
}
+ mtx_unlock(&psp->ps_mtx);
PROC_UNLOCK(p);
/*
@@ -543,6 +544,7 @@ freebsd4_sendsig(catcher, sig, mask, code)
regs->tf_fs = _udatasel;
regs->tf_ss = _udatasel;
PROC_LOCK(p);
+ mtx_lock(&psp->ps_mtx);
}
#endif /* COMPAT_FREEBSD4 */
@@ -565,6 +567,7 @@ sendsig(catcher, sig, mask, code)
p = td->td_proc;
PROC_LOCK_ASSERT(p, MA_OWNED);
psp = p->p_sigacts;
+ mtx_assert(&psp->ps_mtx,.MA_OWNED);
#ifdef COMPAT_FREEBSD4
if (SIGISMEMBER(psp->ps_freebsd4, sig)) {
freebsd4_sendsig(catcher, sig, mask, code);
@@ -605,7 +608,6 @@ sendsig(catcher, sig, mask, code)
sp = (char *)regs->tf_esp - sizeof(struct sigframe);
/* Align to 16 bytes. */
sfp = (struct sigframe *)((unsigned int)sp & ~0xF);
- PROC_UNLOCK(p);
/* Translate the signal if appropriate. */
if (p->p_sysent->sv_sigtbl && sig <= p->p_sysent->sv_sigsize)
@@ -614,8 +616,7 @@ sendsig(catcher, sig, mask, code)
/* Build the argument list for the signal handler. */
sf.sf_signum = sig;
sf.sf_ucontext = (register_t)&sfp->sf_uc;
- PROC_LOCK(p);
- if (SIGISMEMBER(p->p_sigacts->ps_siginfo, sig)) {
+ if (SIGISMEMBER(psp->ps_siginfo, sig)) {
/* Signal handler installed with SA_SIGINFO. */
sf.sf_siginfo = (register_t)&sfp->sf_si;
sf.sf_ahu.sf_action = (__siginfohandler_t *)catcher;
@@ -630,6 +631,7 @@ sendsig(catcher, sig, mask, code)
sf.sf_addr = regs->tf_err;
sf.sf_ahu.sf_handler = catcher;
}
+ mtx_unlock(&psp->ps_mtx);
PROC_UNLOCK(p);
/*
@@ -681,6 +683,7 @@ sendsig(catcher, sig, mask, code)
regs->tf_fs = _udatasel;
regs->tf_ss = _udatasel;
PROC_LOCK(p);
+ mtx_lock(&psp->ps_mtx);
}
/*
OpenPOWER on IntegriCloud