void _mkp_core_thctx() { cache_stats_thread_init(); curr_reqs_thread_init(); cache_req_thread_init(); cache_file_thread_init(); timer_thread_init(); pipe_buf_thread_init(); }
void TimerInit(void) { TimerReset(); #if PRECISE_TIMING // Start timer thread #ifdef PRECISE_TIMING_BEOS wakeup_time_sem = create_sem(1, "Wakeup Time"); timer_thread = spawn_thread(timer_func, "Time Manager", B_REAL_TIME_PRIORITY, NULL); resume_thread(timer_thread); #elif PRECISE_TIMING_MACH pthread_t pthread; host_get_clock_service(mach_host_self(), REALTIME_CLOCK, &system_clock); semaphore_create(mach_task_self(), &wakeup_time_sem, SYNC_POLICY_FIFO, 1); pthread_create(&pthread, NULL, &timer_func, NULL); #endif #ifdef PRECISE_TIMING_POSIX timer_thread_active = timer_thread_init(); #endif #endif }