diff options
author | jeff <jeff@FreeBSD.org> | 2003-04-01 01:26:20 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2003-04-01 01:26:20 +0000 |
commit | 1b4d7b91cef2a324650912a6c4a57c1247f72de9 (patch) | |
tree | fe9429d1c952f94fe7724a5e8d93774c365108da /sys/kern/kern_exit.c | |
parent | ddd831445867d7b38b022286ecc4d99f0bcbca48 (diff) | |
download | FreeBSD-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_exit.c')
-rw-r--r-- | sys/kern/kern_exit.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index dd537b2..fee6caf 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -129,15 +129,17 @@ exit1(struct thread *td, int rv) } /* - * XXXKSE: MUST abort all other threads before proceeding past here. + * MUST abort all other threads before proceeding past here. */ PROC_LOCK(p); - if (p->p_flag & P_THREADED) { + if (p->p_flag & P_THREADED || p->p_numthreads > 1) { /* * First check if some other thread got here before us.. * if so, act apropriatly, (exit or suspend); */ + DROP_GIANT(); thread_suspend_check(0); + PICKUP_GIANT(); /* * Kill off the other threads. This requires |