Lines Matching refs:thread

54 #include <kern/thread.h>
73 thread_t thread);
82 thread_t thread);
131 sched_grrr_compute_priority(thread_t thread,
137 thread_t thread);
142 thread_t thread,
152 thread_t thread);
169 sched_grrr_initial_quantum_size(thread_t thread);
175 sched_grrr_can_update_priority(thread_t thread);
178 sched_grrr_update_priority(thread_t thread);
181 sched_grrr_lightweight_update_priority(thread_t thread);
184 sched_grrr_quantum_expire(thread_t thread);
332 sched_grrr_compute_priority(thread_t thread,
335 set_sched_pri(thread, thread->priority);
341 thread_t thread)
343 return choose_processor(pset, processor, thread);
349 thread_t thread,
355 result = grrr_enqueue(rq, thread);
357 thread->runq = processor;
367 thread_t thread;
373 while ((thread = sched_grrr_choose_thread(processor, IDLEPRI, AST_NONE)) != THREAD_NULL) {
374 if (thread->bound_processor == PROCESSOR_NULL) {
375 enqueue_tail(&tqueue, (queue_entry_t)thread);
377 enqueue_tail(&bqueue, (queue_entry_t)thread);
381 while ((thread = (thread_t)(void *)dequeue_head(&bqueue)) != THREAD_NULL) {
382 sched_grrr_processor_enqueue(processor, thread, SCHED_TAILQ);
387 while ((thread = (thread_t)(void *)dequeue_head(&tqueue)) != THREAD_NULL) {
388 thread_lock(thread);
390 thread_setrun(thread, SCHED_TAILQ);
392 thread_unlock(thread);
399 thread_t thread)
406 if (processor == thread->runq) {
413 grrr_remove(rq, thread);
416 * The thread left the run queue before we could
419 assert(thread->runq == PROCESSOR_NULL);
487 sched_grrr_initial_quantum_size(thread_t thread __unused)
502 sched_grrr_can_update_priority(thread_t thread __unused)
508 sched_grrr_update_priority(thread_t thread __unused)
514 sched_grrr_lightweight_update_priority(thread_t thread __unused)
521 thread_t thread __unused)
597 thread_t thread;
603 thread = group->current_client;
604 if (thread == THREAD_NULL) {
605 thread = (thread_t)(void *)queue_first(&group->clients);
609 group->current_client = (thread_t)(void *)queue_next((queue_entry_t)thread);
614 thread = group->current_client;
617 return thread;
623 thread_t thread;
636 thread = grrr_intragroup_schedule(group);
669 return thread;
721 thread_t thread)
727 gpriority = grrr_priority_mapping[thread->sched_pri];
732 thread->grrr_deficit = 0;
737 enqueue_tail(&group->clients, (queue_entry_t)thread);
740 group->current_client = thread;
745 enqueue_head(&group->clients, (queue_entry_t)thread);
747 insque((queue_entry_t)thread, queue_prev((queue_entry_t)group->current_client));
768 thread_t thread;
770 thread = grrr_intergroup_schedule(rq);
771 if (thread != THREAD_NULL) {
776 gpriority = grrr_priority_mapping[thread->sched_pri];
780 remqueue((queue_entry_t)thread);
784 if (group->current_client == thread) {
801 thread->runq = PROCESSOR_NULL;
805 return (thread);
811 thread_t thread)
817 gpriority = grrr_priority_mapping[thread->sched_pri];
821 remqueue((queue_entry_t)thread);
825 if (group->current_client == thread) {
842 thread->runq = PROCESSOR_NULL;
916 sched_grrr_fairshare_enqueue(thread_t thread)
920 (void)grrr_enqueue(&fs_grrr_runq, thread);
922 thread->runq = FS_GRRR_RUNQ;
929 thread_t thread;
933 thread = grrr_select(&fs_grrr_runq);
937 return (thread);
944 boolean_t sched_grrr_fairshare_queue_remove(thread_t thread)
949 if (FS_GRRR_RUNQ == thread->runq) {
950 grrr_remove(&fs_grrr_runq, thread);
957 * The thread left the run queue before we could
960 assert(thread->runq == PROCESSOR_NULL);