Lines Matching refs:thread

90 #include <kern/thread.h>
125 thread_t thread);
170 thread_t thread;
235 * Initialize the IPC, task, and thread subsystems.
244 * Create a kernel thread to execute the kernel bootstrap.
247 result = kernel_thread_create((thread_continue_t)kernel_bootstrap_thread, NULL, MAXPRI_KERNEL, &thread);
251 thread->state = TH_RUN;
252 thread_deallocate(thread);
255 load_context(thread);
264 * Now running in a thread. Kick off other services,
275 * Create the idle processor thread.
429 * Load the first thread to start a processor.
435 thread_t thread;
438 * Use the idle processor thread if there
439 * is no dedicated start up thread.
442 thread = processor->idle_thread;
443 thread->continuation = (thread_continue_t)processor_start_thread;
444 thread->parameter = machine_param;
447 thread = processor->next_thread;
451 load_context(thread);
458 * First thread to execute on a started processor.
471 * If running the idle processor thread,
484 * Start the first thread on a processor.
488 thread_t thread)
495 machine_set_current_thread(thread);
504 * should never occur since the thread is expected
507 load_context_kprintf("thread %p, stack %x, stackptr %x\n", thread,
508 thread->kernel_stack, thread->machine.iss->sp);
509 if (!thread->kernel_stack) {
511 if (!stack_alloc_try(thread))
519 if (!(thread->state & TH_IDLE))
522 processor->active_thread = thread;
523 processor->current_pri = thread->sched_pri;
524 processor->current_thmode = thread->sched_mode;
526 thread->last_processor = processor;
529 timer_start(&thread->system_timer, processor->last_dispatch);
530 PROCESSOR_DATA(processor, thread_timer) = PROCESSOR_DATA(processor, kernel_timer) = &thread->system_timer;
535 PMAP_ACTIVATE_USER(thread, processor->cpu_id);
538 machine_load_context(thread);