summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_fork.c
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2003-04-01 01:26:20 +0000
committerjeff <jeff@FreeBSD.org>2003-04-01 01:26:20 +0000
commit1b4d7b91cef2a324650912a6c4a57c1247f72de9 (patch)
treefe9429d1c952f94fe7724a5e8d93774c365108da /sys/kern/kern_fork.c
parentddd831445867d7b38b022286ecc4d99f0bcbca48 (diff)
downloadFreeBSD-src-1b4d7b91cef2a324650912a6c4a57c1247f72de9.zip
FreeBSD-src-1b4d7b91cef2a324650912a6c4a57c1247f72de9.tar.gz
- Borrow the KSE single threading code for exec and exit. We use the check
if (p->p_numthreads > 1) and not a flag because action is only necessary if there are other threads. The rest of the system has no need to identify thr threaded processes. - In kern_thread.c use thr_exit1() instead of thread_exit() if P_THREADED is not set.
Diffstat (limited to 'sys/kern/kern_fork.c')
-rw-r--r--sys/kern/kern_fork.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index 11a94d9..9a74d25 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -265,6 +265,11 @@ fork1(td, flags, pages, procp)
return (0);
}
+ /*
+ * Note 1:1 allows for forking with one thread coming out on the
+ * other side with the expectation that the process is about to
+ * exec.
+ */
if (p1->p_flag & P_THREADED) {
/*
* Idle the other threads for a second.
OpenPOWER on IntegriCloud