summaryrefslogtreecommitdiffstats
path: root/sys/kern/init_main.c
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>1999-01-07 21:23:50 +0000
committerjulian <julian@FreeBSD.org>1999-01-07 21:23:50 +0000
commita7b385889ec602ef4648e627bcb67bf0fd8d539d (patch)
tree1272156e48dfdcff77f2732eaba7e964197de3bb /sys/kern/init_main.c
parent4cb6632c89aa14d9544a8ffe3e463e6e21aec1f3 (diff)
downloadFreeBSD-src-a7b385889ec602ef4648e627bcb67bf0fd8d539d.zip
FreeBSD-src-a7b385889ec602ef4648e627bcb67bf0fd8d539d.tar.gz
Changes to the LINUX_THREADS support to only allocate extra memory for
shared signal handling when there is shared signal handling being used. This removes the main objection to making the shared signal handling a standard ability in rfork() and friends and 'unconditionalising' this code. (i.e. the allocation of an extra 328 bytes per process). Signal handling information remains in the U area until such a time as it's reference count would be incremented to > 1. At that point a new struct is malloc'd and maintained in KVM so that it can be shared between the processes (threads) using it. A function to check the reference count and move the struct back to the U area when it drops back to 1 is also supplied. Signal information is therefore now swapable for all processes that are not sharing that information with other processes. THis should addres the concerns raised by Garrett and others. Submitted by: "Richard Seaman, Jr." <dick@tar.com>
Diffstat (limited to 'sys/kern/init_main.c')
-rw-r--r--sys/kern/init_main.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 9269b26..246684f 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* @(#)init_main.c 8.9 (Berkeley) 1/21/94
- * $Id: init_main.c,v 1.101 1998/12/19 08:23:31 julian Exp $
+ * $Id: init_main.c,v 1.102 1998/12/30 10:38:58 dfr Exp $
*/
#include "opt_devfs.h"
@@ -469,22 +469,12 @@ proc0_init(dummy)
#endif /* INCOMPAT_LITES2*/
#endif
-#ifndef COMPAT_LINUX_THREADS
/*
* We continue to place resource usage info and signal
* actions in the user struct so they're pageable.
*/
p->p_stats = &p->p_addr->u_stats;
p->p_sigacts = &p->p_addr->u_sigacts;
-#else
- /*
- * We continue to place resource usage info in the user struct so
- * it's pageable.
- */
- p->p_stats = &p->p_addr->u_stats;
-
- p->p_sigacts = &p->p_procsig->ps_sigacts;
-#endif /* COMPAT_LINUX_THREADS */
/*
* Charge root for one process.
OpenPOWER on IntegriCloud