summaryrefslogtreecommitdiffstats
path: root/sys/vm
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/vm
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/vm')
-rw-r--r--sys/vm/vm_glue.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c
index cd00c33..3c42cca 100644
--- a/sys/vm/vm_glue.c
+++ b/sys/vm/vm_glue.c
@@ -441,23 +441,14 @@ vm_forkproc(td, p2, td2, flags)
/* XXXKSE this is unsatisfactory but should be adequate */
up = p2->p_uarea;
+ MPASS(p2->p_sigacts != NULL);
/*
* p_stats currently points at fields in the user struct
* but not at &u, instead at p_addr. Copy parts of
* p_stats; zero the rest of p_stats (statistics).
- *
- * If procsig->ps_refcnt is 1 and p2->p_sigacts is NULL we dont' need
- * to share sigacts, so we use the up->u_sigacts.
*/
p2->p_stats = &up->u_stats;
- if (p2->p_sigacts == NULL) {
- if (p2->p_procsig->ps_refcnt != 1)
- printf ("PID:%d NULL sigacts with refcnt not 1!\n",p2->p_pid);
- p2->p_sigacts = &up->u_sigacts;
- up->u_sigacts = *p1->p_sigacts;
- }
-
bzero(&up->u_stats.pstat_startzero,
(unsigned) ((caddr_t) &up->u_stats.pstat_endzero -
(caddr_t) &up->u_stats.pstat_startzero));
@@ -465,7 +456,6 @@ vm_forkproc(td, p2, td2, flags)
((caddr_t) &up->u_stats.pstat_endcopy -
(caddr_t) &up->u_stats.pstat_startcopy));
-
/*
* cpu_fork will copy and update the pcb, set up the kernel stack,
* and make the child ready to run.
OpenPOWER on IntegriCloud