diff options
| author | Daniel Eischen <deischen@FreeBSD.org> | 2004-08-07 15:15:38 +0000 |
|---|---|---|
| committer | Daniel Eischen <deischen@FreeBSD.org> | 2004-08-07 15:15:38 +0000 |
| commit | 00be1d3d12712e135e623008af4c7038730e61a3 (patch) | |
| tree | a52137064a9f6d0ca8cd37a63377945781591df2 /lib/libpthread/thread/thr_init.c | |
| parent | ea39d07d2a9079982946d46e4ff61e14bf37a957 (diff) | |
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_init.c')
| -rw-r--r-- | lib/libpthread/thread/thr_init.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/libpthread/thread/thr_init.c b/lib/libpthread/thread/thr_init.c index 36e7e69c4712..6c371b0e4ebe 100644 --- a/lib/libpthread/thread/thr_init.c +++ b/lib/libpthread/thread/thr_init.c @@ -258,11 +258,7 @@ _libpthread_init(struct pthread *curthread) _kse_init(); /* Initialize the initial kse and kseg. */ -#ifdef SYSTEM_SCOPE_ONLY - _kse_initial = _kse_alloc(NULL, 1); -#else - _kse_initial = _kse_alloc(NULL, 0); -#endif + _kse_initial = _kse_alloc(NULL, _thread_scope_system); if (_kse_initial == NULL) PANIC("Can't allocate initial kse."); _kse_initial->k_kseg = _kseg_alloc(NULL); @@ -467,6 +463,14 @@ init_private(void) /* Clear pending signals and get the process signal mask. */ SIGEMPTYSET(_thr_proc_sigpending); + /* Are we in M:N mode (default) or 1:1 mode? */ +#ifdef SYSTEM_SCOPE_ONLY + _thread_scope_system = 1; +#else + if (getenv("LIBPTHREAD_SYSTEM_SCOPE") != NULL) + _thread_scope_system = 1; +#endif + /* * _thread_list_lock and _kse_count are initialized * by _kse_init() |
