summaryrefslogtreecommitdiffstats
path: root/sys/kern/init_main.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2003-05-13 20:36:02 +0000
committerjhb <jhb@FreeBSD.org>2003-05-13 20:36:02 +0000
commit89a4eb17deddba4ba8bfb0cf7c6801a608731f8c (patch)
tree0e2ba79e40f08e96bb98756b67576ff96caccfbc /sys/kern/init_main.c
parent3b9288c6f4df2bfdc2a41de3ae161246c310e064 (diff)
downloadFreeBSD-src-89a4eb17deddba4ba8bfb0cf7c6801a608731f8c.zip
FreeBSD-src-89a4eb17deddba4ba8bfb0cf7c6801a608731f8c.tar.gz
- 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)
Diffstat (limited to 'sys/kern/init_main.c')
-rw-r--r--sys/kern/init_main.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 83fca78..6caec77 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -90,7 +90,6 @@ struct proc proc0;
struct thread thread0;
struct kse kse0;
struct ksegrp ksegrp0;
-static struct procsig procsig0;
static struct filedesc0 filedesc0;
static struct plimit limit0;
struct vmspace vmspace0;
@@ -399,9 +398,8 @@ proc0_init(void *dummy __unused)
#endif
td->td_ucred = crhold(p->p_ucred);
- /* Create procsig. */
- p->p_procsig = &procsig0;
- p->p_procsig->ps_refcnt = 1;
+ /* Create sigacts. */
+ p->p_sigacts = sigacts_alloc();
/* Initialize signal state for process 0. */
siginit(&proc0);
@@ -441,11 +439,10 @@ proc0_init(void *dummy __unused)
vmspace0.vm_map.pmap = vmspace_pmap(&vmspace0);
/*
- * We continue to place resource usage info and signal
- * actions in the user struct so they're pageable.
+ * We continue to place resource usage info
+ * in the user struct so that it's pageable.
*/
p->p_stats = &p->p_uarea->u_stats;
- p->p_sigacts = &p->p_uarea->u_sigacts;
/*
* Charge root for one process.
OpenPOWER on IntegriCloud