Changeset View
Changeset View
Standalone View
Standalone View
lib/libthr/thread/thr_init.c
Show First 20 Lines • Show All 455 Lines • ▼ Show 20 Lines | init_private(void) | ||||
_suspend_all_waiters = 0; | _suspend_all_waiters = 0; | ||||
/* | /* | ||||
* Avoid reinitializing some things if they don't need to be, | * Avoid reinitializing some things if they don't need to be, | ||||
* e.g. after a fork(). | * e.g. after a fork(). | ||||
*/ | */ | ||||
if (init_once == 0) { | if (init_once == 0) { | ||||
__thr_pshared_init(); | __thr_pshared_init(); | ||||
__thr_malloc_init(); | |||||
/* Find the stack top */ | /* Find the stack top */ | ||||
mib[0] = CTL_KERN; | mib[0] = CTL_KERN; | ||||
mib[1] = KERN_USRSTACK; | mib[1] = KERN_USRSTACK; | ||||
len = sizeof (_usrstack); | len = sizeof (_usrstack); | ||||
if (sysctl(mib, 2, &_usrstack, &len, NULL, 0) == -1) | if (sysctl(mib, 2, &_usrstack, &len, NULL, 0) == -1) | ||||
PANIC("Cannot get kern.usrstack from sysctl"); | PANIC("Cannot get kern.usrstack from sysctl"); | ||||
env_bigstack = getenv("LIBPTHREAD_BIGSTACK_MAIN"); | env_bigstack = getenv("LIBPTHREAD_BIGSTACK_MAIN"); | ||||
env_splitstack = getenv("LIBPTHREAD_SPLITSTACK_MAIN"); | env_splitstack = getenv("LIBPTHREAD_SPLITSTACK_MAIN"); | ||||
Show All 26 Lines |