Lines Matching refs:work

123     nxt_work_t              *work;  in nxt_work_queue_allocate()  local
135 work = &chunk->work; in nxt_work_queue_allocate()
138 work[i].next = &work[i + 1]; in nxt_work_queue_allocate()
141 work[i].next = NULL; in nxt_work_queue_allocate()
142 work++; in nxt_work_queue_allocate()
146 work = NULL; in nxt_work_queue_allocate()
153 cache->spare = work; in nxt_work_queue_allocate()
163 nxt_work_t *work; in nxt_work_queue_add() local
168 work = wq->cache->next; in nxt_work_queue_add()
170 if (nxt_fast_path(work != NULL)) { in nxt_work_queue_add()
171 wq->cache->next = work->next; in nxt_work_queue_add()
172 work->next = NULL; in nxt_work_queue_add()
174 work->handler = handler; in nxt_work_queue_add()
175 work->task = task; in nxt_work_queue_add()
176 work->obj = obj; in nxt_work_queue_add()
177 work->data = data; 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()
200 nxt_work_t *work; in nxt_work_queue_pop() local
204 work = wq->head; in nxt_work_queue_pop()
206 wq->head = work->next; in nxt_work_queue_pop()
208 if (work->next == NULL) { in nxt_work_queue_pop()
212 *task = work->task; in nxt_work_queue_pop()
214 *obj = work->obj; in nxt_work_queue_pop()
217 *data = work->data; 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()
223 return work->handler; in nxt_work_queue_pop()
230 nxt_locked_work_queue_add(nxt_locked_work_queue_t *lwq, nxt_work_t *work) in nxt_locked_work_queue_add() argument
235 lwq->tail->next = work; in nxt_locked_work_queue_add()
238 lwq->head = work; in nxt_locked_work_queue_add()
241 lwq->tail = work; in nxt_locked_work_queue_add()
253 nxt_work_t *work; in nxt_locked_work_queue_pop() local
260 work = lwq->head; in nxt_locked_work_queue_pop()
262 if (work != NULL) { in nxt_locked_work_queue_pop()
263 *task = work->task; in nxt_locked_work_queue_pop()
265 *obj = work->obj; in nxt_locked_work_queue_pop()
268 *data = work->data; in nxt_locked_work_queue_pop()
271 lwq->head = work->next; in nxt_locked_work_queue_pop()
273 if (work->next == NULL) { in nxt_locked_work_queue_pop()
277 handler = work->handler; in nxt_locked_work_queue_pop()
292 nxt_work_t *work; in nxt_locked_work_queue_move() local
296 work = lwq->head; in nxt_locked_work_queue_move()
303 while (work != NULL) { in nxt_locked_work_queue_move()
304 work->task->thread = thr; in nxt_locked_work_queue_move()
306 nxt_work_queue_add(wq, work->handler, work->task, in nxt_locked_work_queue_move()
307 work->obj, work->data); in nxt_locked_work_queue_move()
309 work = work->next; in nxt_locked_work_queue_move()