aboutsummaryrefslogtreecommitdiff
path: root/sys/sparc64/sparc64/machdep.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2003-05-13 20:36:02 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2003-05-13 20:36:02 +0000
commit90af4afacb3d76aba2261a2dba4a1c5f69670a19 (patch)
tree0e2ba79e40f08e96bb98756b67576ff96caccfbc /sys/sparc64/sparc64/machdep.c
parent3ecb3802eeb415f4837f7e0af26c584a333018d2 (diff)
downloadsrc-90af4afacb3d76aba2261a2dba4a1c5f69670a19.tar.gz
src-90af4afacb3d76aba2261a2dba4a1c5f69670a19.zip
- Merge struct procsig with struct sigacts.
- Move struct sigacts out of the u-area and malloc() it using the M_SUBPROC malloc bucket. - Add a small sigacts_*() API for managing sigacts structures: sigacts_alloc(), sigacts_free(), sigacts_copy(), sigacts_share(), and sigacts_shared(). - Remove the p_sigignore, p_sigacts, and p_sigcatch macros. - Add a mutex to struct sigacts that protects all the members of the struct. - Add sigacts locking. - Remove Giant from nosys(), kill(), killpg(), and kern_sigaction() now that sigacts is locked. - Several in-kernel functions such as psignal(), tdsignal(), trapsignal(), and thread_stopped() are now MP safe. Reviewed by: arch@ Approved by: re (rwatson)
Notes
Notes: svn path=/head/; revision=114983
Diffstat (limited to 'sys/sparc64/sparc64/machdep.c')
-rw-r--r--sys/sparc64/sparc64/machdep.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/sparc64/sparc64/machdep.c b/sys/sparc64/sparc64/machdep.c
index 6cf0f6af2df8..669f4c7b30f5 100644
--- a/sys/sparc64/sparc64/machdep.c
+++ b/sys/sparc64/sparc64/machdep.c
@@ -403,7 +403,9 @@ sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
oonstack = 0;
td = curthread;
p = td->td_proc;
+ PROC_LOCK_ASSERT(p, MA_OWNED);
psp = p->p_sigacts;
+ mtx_assert(&psp->ps_mtx, MA_OWNED);
tf = td->td_frame;
sp = tf->tf_sp + SPOFF;
oonstack = sigonstack(sp);
@@ -437,6 +439,7 @@ sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
p->p_sigstk.ss_size - sizeof(struct sigframe));
} else
sfp = (struct sigframe *)sp - 1;
+ mtx_unlock(&psp->ps_mtx);
PROC_UNLOCK(p);
fp = (struct frame *)sfp - 1;
@@ -476,6 +479,7 @@ sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
tf->tf_sp);
PROC_LOCK(p);
+ mtx_lock(&psp->ps_mtx);
}
#ifndef _SYS_SYSPROTO_H_