Lines Matching refs:processor
85 #include <kern/processor.h>
104 processor_t processor);
109 * Flag processor as up and running, and available
114 processor_t processor)
120 init_ast_check(processor);
121 pset = processor->processor_set;
124 pset->low_pri = pset->low_count = processor;
125 enqueue_tail(&pset->active_queue, (queue_entry_t)processor);
126 processor->state = PROCESSOR_RUNNING;
160 __unused processor_t processor,
169 processor_t processor)
175 pset = processor->processor_set;
177 if (processor->state == PROCESSOR_OFF_LINE) {
187 if (processor->state == PROCESSOR_START) {
198 * If the processor is dispatching, let it finish.
200 while (processor->state == PROCESSOR_DISPATCHING) {
209 if (processor->state == PROCESSOR_SHUTDOWN) {
216 if (processor->state == PROCESSOR_IDLE)
217 remqueue(&pset->idle_queue, (queue_entry_t)processor);
219 if (processor->state == PROCESSOR_RUNNING)
220 remqueue(&pset->active_queue, (queue_entry_t)processor);
222 processor->state = PROCESSOR_SHUTDOWN;
226 processor_doshutdown(processor);
229 cpu_exit_wait(processor->cpu_num);
239 processor_t processor)
245 * Get onto the processor to shutdown
247 prev = thread_bind(processor);
255 assert(processor->state == PROCESSOR_SHUTDOWN);
263 * Continue processor shutdown in shutdown context.
266 old_thread = machine_processor_shutdown(self, processor_offline, processor);
272 * Complete the shutdown and place the processor offline.
278 processor_t processor)
280 thread_t new_thread, old_thread = processor->active_thread;
283 new_thread = processor->idle_thread;
284 processor->active_thread = new_thread;
285 processor->current_pri = IDLEPRI;
286 processor->deadline = UINT64_MAX;
287 new_thread->last_processor = processor;
289 processor->last_dispatch = mach_absolute_time();
290 timer_stop(PROCESSOR_DATA(processor, thread_timer), processor->last_dispatch);
296 PMAP_DEACTIVATE_KERNEL(processor->cpu_num);
298 pset = processor->processor_set;
300 processor->state = PROCESSOR_OFF_LINE;
304 processor_queue_shutdown(processor);
310 panic("zombie processor");