Lines Matching refs:thread
45 #include <kern/thread.h>
59 sched_dualq_processor_enqueue(processor_t processor, thread_t thread, integer_t options);
62 sched_dualq_processor_queue_remove(processor_t processor, thread_t thread);
150 static inline run_queue_t dualq_runq_for_thread(processor_t processor, thread_t thread)
152 if (thread->bound_processor == PROCESSOR_NULL) {
155 assert(thread->bound_processor == processor);
221 thread_t thread,
224 run_queue_t rq = dualq_runq_for_thread(processor, thread);
227 result = run_queue_enqueue(rq, thread, options);
228 thread->runq = processor;
321 thread_t thread;
333 thread = run_queue_dequeue(rq, SCHED_HEADQ);
334 enqueue_tail(&tqueue, (queue_entry_t)thread);
339 while ((thread = (thread_t)(void*)dequeue_head(&tqueue)) != THREAD_NULL) {
340 thread_lock(thread);
342 thread_setrun(thread, SCHED_TAILQ);
344 thread_unlock(thread);
351 thread_t thread)
358 rq = dualq_runq_for_thread(processor, thread);
360 if (processor == thread->runq) {
365 run_queue_remove(rq, thread);
369 * The thread left the run queue before we could
372 assert(thread->runq == PROCESSOR_NULL);
385 thread_t thread;
389 thread = run_queue_dequeue(&cset->pset_runq, SCHED_HEADQ);
391 return (thread);
415 thread_t thread;
438 thread = processor->idle_thread;
439 if (thread != THREAD_NULL && thread->sched_stamp != sched_tick) {
440 if (thread_update_add_thread(thread) == FALSE) {