Lines Matching refs:wq

38 nxt_work_queue_thread_assert(nxt_work_queue_t *wq)  in nxt_work_queue_thread_assert()  argument
46 if (nxt_fast_path(wq->tid == tid)) { in nxt_work_queue_thread_assert()
50 if (nxt_slow_path(nxt_pid != wq->pid)) { in nxt_work_queue_thread_assert()
51 wq->pid = nxt_pid; in nxt_work_queue_thread_assert()
52 wq->tid = tid; in nxt_work_queue_thread_assert()
57 nxt_log_alert(thread->log, "work queue locked by thread %PT", wq->tid); in nxt_work_queue_thread_assert()
62 void nxt_work_queue_thread_adopt(nxt_work_queue_t *wq) in nxt_work_queue_thread_adopt() argument
68 wq->pid = nxt_pid; in nxt_work_queue_thread_adopt()
69 wq->tid = nxt_thread_tid(thread); in nxt_work_queue_thread_adopt()
74 nxt_work_queue_name(nxt_work_queue_t *wq, const char *name) in nxt_work_queue_name() argument
76 nxt_work_queue_thread_assert(wq); in nxt_work_queue_name()
78 wq->name = name; in nxt_work_queue_name()
83 #define nxt_work_queue_thread_assert(wq) argument
160 nxt_work_queue_add(nxt_work_queue_t *wq, nxt_work_handler_t handler, in nxt_work_queue_add() argument
165 nxt_work_queue_thread_assert(wq); in nxt_work_queue_add()
168 work = wq->cache->next; in nxt_work_queue_add()
171 wq->cache->next = work->next; in nxt_work_queue_add()
179 if (wq->tail != NULL) { in nxt_work_queue_add()
180 wq->tail->next = work; in nxt_work_queue_add()
183 wq->head = work; in nxt_work_queue_add()
186 wq->tail = work; in nxt_work_queue_add()
191 nxt_work_queue_allocate(wq->cache); in nxt_work_queue_add()
197 nxt_work_queue_pop(nxt_work_queue_t *wq, nxt_task_t **task, void **obj, in nxt_work_queue_pop() argument
202 nxt_work_queue_thread_assert(wq); in nxt_work_queue_pop()
204 work = wq->head; in nxt_work_queue_pop()
206 wq->head = work->next; in nxt_work_queue_pop()
209 wq->tail = NULL; in nxt_work_queue_pop()
220 work->next = wq->cache->next; in nxt_work_queue_pop()
221 wq->cache->next = work; in nxt_work_queue_pop()
290 nxt_work_queue_t *wq) in nxt_locked_work_queue_move() argument
306 nxt_work_queue_add(wq, work->handler, work->task, in nxt_locked_work_queue_move()