summaryrefslogtreecommitdiffstats
path: root/lib/libpthread
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2004-07-13 22:51:03 +0000
committerdavidxu <davidxu@FreeBSD.org>2004-07-13 22:51:03 +0000
commit4eaa7c96d835011d9ce67be405fdba2d54544c41 (patch)
treeb53af6ef6b69febaaea79d98c447977d02a94e11 /lib/libpthread
parent2e3100b5472a1681f180c58f1b10e6af461d6176 (diff)
downloadFreeBSD-src-4eaa7c96d835011d9ce67be405fdba2d54544c41.zip
FreeBSD-src-4eaa7c96d835011d9ce67be405fdba2d54544c41.tar.gz
If _libkse_debug is not zero, activate thread mode.
Diffstat (limited to 'lib/libpthread')
-rw-r--r--lib/libpthread/thread/thr_init.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libpthread/thread/thr_init.c b/lib/libpthread/thread/thr_init.c
index d7c6296..36e7e69 100644
--- a/lib/libpthread/thread/thr_init.c
+++ b/lib/libpthread/thread/thr_init.c
@@ -310,6 +310,12 @@ _libpthread_init(struct pthread *curthread)
_thr_signal_init();
_kse_critical_leave(&_thr_initial->tcb->tcb_tmbx);
+ /*
+ * activate threaded mode as soon as possible if we are
+ * being debugged
+ */
+ if (_libkse_debug)
+ _kse_setthreaded(1);
}
/*
OpenPOWER on IntegriCloud