Lines Matching refs:processor
60 * processor.c: processor and processor_set manipulation routines.
65 #include <mach/processor.h>
72 #include <kern/processor.h>
134 * Initialize the given processor for the cpu
136 * specified processor set.
140 processor_t processor,
144 run_queue_init(&processor->runq);
146 processor->state = PROCESSOR_OFF_LINE;
147 processor->active_thread = processor->next_thread = processor->idle_thread = THREAD_NULL;
148 processor->processor_set = pset;
149 processor->current_pri = MINPRI;
150 processor->cpu_num = cpu_num;
151 timer_call_setup(&processor->quantum_timer, thread_quantum_expire, processor);
152 processor->deadline = UINT64_MAX;
153 processor->timeslice = 0;
154 processor->processor_self = IP_NULL;
155 simple_lock_init(&processor->lock, 0);
156 processor_data_init(processor);
157 processor->processor_list = NULL;
161 processor_list = processor;
163 processor_list_tail->processor_list = processor;
164 processor_list_tail = processor;
171 processor_t processor)
173 return (processor->processor_set);
249 register processor_t processor,
258 if (processor == PROCESSOR_NULL)
261 cpu_num = processor->cpu_num;
275 state = processor->state;
281 if (processor == master_processor)
301 timer_grab(&PROCESSOR_DATA(processor, user_state)) / hz_tick_interval;
303 timer_grab(&PROCESSOR_DATA(processor, system_state)) / hz_tick_interval;
305 timer_grab(&PROCESSOR_DATA(processor, idle_state)) / hz_tick_interval;
325 processor_t processor)
332 if (processor == PROCESSOR_NULL || processor->processor_set == PROCESSOR_SET_NULL)
335 if (processor == master_processor) {
338 prev = thread_bind(processor);
341 result = cpu_start(processor->cpu_num);
349 pset = processor->processor_set;
351 if (processor->state != PROCESSOR_OFF_LINE) {
358 processor->state = PROCESSOR_START;
363 * Create the idle processor thread.
365 if (processor->idle_thread == THREAD_NULL) {
366 result = idle_thread_create(processor);
370 processor->state = PROCESSOR_OFF_LINE;
379 * If there is no active thread, the processor
383 if ( processor->active_thread == THREAD_NULL &&
384 processor->next_thread == THREAD_NULL ) {
389 processor->state = PROCESSOR_OFF_LINE;
398 thread->bound_processor = processor;
399 processor->next_thread = thread;
407 if (processor->processor_self == IP_NULL)
408 ipc_processor_init(processor);
410 result = cpu_start(processor->cpu_num);
414 processor->state = PROCESSOR_OFF_LINE;
421 ipc_processor_enable(processor);
428 processor_t processor)
430 if (processor == PROCESSOR_NULL)
433 return(processor_shutdown(processor));
438 processor_t processor,
442 if (processor == PROCESSOR_NULL)
445 return(cpu_control(processor->cpu_num, info, count));
466 processor_t processor,
471 state = processor->state;
606 * Returns scheduling statistics for a processor set.
642 * Specify max priority permitted on processor set. This affects
658 * Allow indicated policy on processor set.
672 * Forbid indicated policy on processor set. Time sharing cannot
862 * List all tasks in the processor set.
876 * List all threads in the processor set.
910 * Controls the scheduling attributes governing the processor set.