static void _PR_InitStuff() { if (_pr_initialized) return; _pr_initialized = PR_TRUE; (void) PR_GetPageSize(); _pr_clock_lm = PR_NewLogModule("clock"); _pr_cmon_lm = PR_NewLogModule("cmon"); _pr_io_lm = PR_NewLogModule("io"); _pr_mon_lm = PR_NewLogModule("mon"); _pr_linker_lm = PR_NewLogModule("linker"); _pr_cvar_lm = PR_NewLogModule("cvar"); _pr_sched_lm = PR_NewLogModule("sched"); _pr_thread_lm = PR_NewLogModule("thread"); _pr_gc_lm = PR_NewLogModule("gc"); /* NOTE: These init's cannot depend on _PR_MD_CURRENT_THREAD() */ _PR_MD_EARLY_INIT(); _PR_InitAtomic(); _PR_InitLocks(); _PR_InitSegs(); _PR_InitStacks(); _PR_InitTPD(); _PR_InitEnv(); _PR_InitLayerCache(); _PR_InitThreads(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0); #ifdef WIN16 { PRInt32 top; /* artificial top of stack, win16 */ _pr_top_of_task_stack = (char *) ⊤ } #endif #ifndef _PR_GLOBAL_THREADS_ONLY _PR_InitCPUs(); #endif /* * XXX: call _PR_InitMem only on those platforms for which nspr implements * malloc, for now. */ #ifdef _PR_OVERRIDE_MALLOC _PR_InitMem(); #endif _PR_InitCMon(); _PR_InitIO(); _PR_InitNet(); _PR_InitClock(); #ifdef PR_LOGGING _PR_InitLog(); #endif _PR_InitLinker(); _PR_InitCallOnce(); _PR_InitDtoa(); _PR_MD_FINAL_INIT(); }
static void _PR_InitStuff(void) { if (_pr_initialized) return; _pr_initialized = PR_TRUE; #ifdef _PR_ZONE_ALLOCATOR _PR_InitZones(); #endif #ifdef WINNT _pr_SetNativeThreadsOnlyMode(); #endif (void) PR_GetPageSize(); _pr_clock_lm = PR_NewLogModule("clock"); _pr_cmon_lm = PR_NewLogModule("cmon"); _pr_io_lm = PR_NewLogModule("io"); _pr_mon_lm = PR_NewLogModule("mon"); _pr_linker_lm = PR_NewLogModule("linker"); _pr_cvar_lm = PR_NewLogModule("cvar"); _pr_sched_lm = PR_NewLogModule("sched"); _pr_thread_lm = PR_NewLogModule("thread"); _pr_gc_lm = PR_NewLogModule("gc"); _pr_shm_lm = PR_NewLogModule("shm"); _pr_shma_lm = PR_NewLogModule("shma"); /* NOTE: These init's cannot depend on _PR_MD_CURRENT_THREAD() */ _PR_MD_EARLY_INIT(); _PR_InitLocks(); _PR_InitAtomic(); _PR_InitSegs(); _PR_InitStacks(); _PR_InitTPD(); _PR_InitEnv(); _PR_InitLayerCache(); _PR_InitClock(); _pr_sleeplock = PR_NewLock(); PR_ASSERT(NULL != _pr_sleeplock); #ifdef GC_LEAK_DETECTOR _PR_InitGarbageCollector(); #endif _PR_InitThreads(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0); #ifdef WIN16 { PRInt32 top; /* artificial top of stack, win16 */ _pr_top_of_task_stack = (char *) ⊤ } #endif #ifndef _PR_GLOBAL_THREADS_ONLY _PR_InitCPUs(); #endif /* * XXX: call _PR_InitMem only on those platforms for which nspr implements * malloc, for now. */ #ifdef _PR_OVERRIDE_MALLOC _PR_InitMem(); #endif _PR_InitCMon(); _PR_InitIO(); _PR_InitNet(); _PR_InitTime(); _PR_InitLog(); _PR_InitLinker(); _PR_InitCallOnce(); _PR_InitDtoa(); _PR_InitMW(); _PR_InitRWLocks(); nspr_InitializePRErrorTable(); _PR_MD_FINAL_INIT(); }