Lines Matching defs:queue
92 #include <kern/queue.h>
192 * W waiting (or on wait queue)
222 * bucket is queue of threads having the same hash function
223 * value; the chain for the queue (linked list) is the run queue
228 * wait event field and the queue chain field. Because wakeup
537 * thread must have been pulled from wait queue under same lock hold.
1055 /* wait queue unlocked, thread still locked */
1869 * New thread must be runnable, and not on a run queue.
1935 * Initialize a run queue before first use.
1955 * Perform a dequeue operation on a run queue,
1958 * The run queue must be locked (see run_queue_remove()
1967 queue_t queue = rq->queues + rq->highq;
1970 thread = (thread_t)queue->next;
1971 ((queue_entry_t)thread)->next->prev = queue;
1972 queue->next = ((queue_entry_t)thread)->next;
1975 thread = (thread_t)queue->prev;
1976 ((queue_entry_t)thread)->prev->next = queue;
1977 queue->prev = ((queue_entry_t)thread)->prev;
1985 if (queue_empty(queue)) {
2004 queue_t queue = rq->queues + thread->sched_pri;
2010 if (queue_empty(queue)) {
2011 enqueue_tail(queue, (queue_entry_t)thread);
2019 register thread_t entry = (thread_t)queue_first(queue);
2022 if ( queue_end(queue, (queue_entry_t)entry) ||
2031 if ((queue_entry_t)entry == queue)
2090 * Enqueue thread on a processor run queue. Thread must be locked,
2091 * and not already be on a run queue.
2094 * of the run queue.
2096 * The run queue must be locked (see run_queue_remove()
2106 queue_t queue = rq->queues + thread->sched_pri;
2109 if (queue_empty(queue)) {
2110 enqueue_tail(queue, (queue_entry_t)thread);
2120 enqueue_tail(queue, (queue_entry_t)thread);
2122 enqueue_head(queue, (queue_entry_t)thread);
2376 * processor or run queue, and signal a preemption
2481 * Shutdown a processor run queue by
2493 queue_t queue = rq->queues + rq->highq;
2501 thread = (thread_t)queue_first(queue);
2502 while (!queue_end(queue, (queue_entry_t)thread)) {
2506 remqueue(queue, (queue_entry_t)thread);
2513 if (queue_empty(queue)) {
2526 queue--; pri--;
2673 * Remove a thread from a current run queue and
2687 * the thread is on a run queue, but could be chosen for dispatch
2697 * global queue with a dedicated lock.
2711 * Thread is on a run queue and we have a lock on
2712 * that run queue.
2721 /* update run queue status */
2731 * The thread left the run queue before we could
2732 * lock the run queue.
2758 queue_t queue = rq->queues + rq->highq;
2763 thread = (thread_t)queue_first(queue);
2764 while (!queue_end(queue, (queue_entry_t)thread)) {
2766 remqueue(queue, (queue_entry_t)thread);
2773 if (queue_empty(queue)) {
2786 queue--; pri--;
3137 * This is necessary because the run queue is locked for