Lines Matching refs:thread

92 #include <kern/thread.h>
162 thread_t thread);
240 thread_t thread;
311 * Initialize the IPC, task, and thread subsystems.
342 * Create a kernel thread to execute the kernel bootstrap.
345 result = kernel_thread_create((thread_continue_t)kernel_bootstrap_thread, NULL, MAXPRI_KERNEL, &thread);
349 thread->state = TH_RUN;
350 thread_deallocate(thread);
353 load_context(thread);
363 * Now running in a thread. Kick off other services,
374 * Create the idle processor thread.
410 * Initialize ipc thread call support.
587 * Load the first thread to start a processor.
593 thread_t thread;
596 * Use the idle processor thread if there
597 * is no dedicated start up thread.
600 thread = processor->idle_thread;
601 thread->continuation = (thread_continue_t)processor_start_thread;
602 thread->parameter = machine_param;
605 thread = processor->next_thread;
609 load_context(thread);
616 * First thread to execute on a started processor.
629 * If running the idle processor thread,
642 * Start the first thread on a processor.
646 thread_t thread)
654 machine_set_current_thread(thread);
663 * should never occur since the thread is expected
666 load_context_kprintf("thread %p, stack %lx, stackptr %lx\n", thread,
667 thread->kernel_stack, thread->machine.kstackptr);
668 if (!thread->kernel_stack) {
670 if (!stack_alloc_try(thread))
678 if (!(thread->state & TH_IDLE))
679 sched_run_incr(thread);
681 processor->active_thread = thread;
682 processor->current_pri = thread->sched_pri;
683 processor->current_thmode = thread->sched_mode;
685 thread->last_processor = processor;
688 timer_start(&thread->system_timer, processor->last_dispatch);
689 PROCESSOR_DATA(processor, thread_timer) = PROCESSOR_DATA(processor, kernel_timer) = &thread->system_timer;
694 PMAP_ACTIVATE_USER(thread, processor->cpu_id);
697 machine_load_context(thread);