Lines Matching refs:loop
124 uv_mutex_lock(&w->loop->wq_mutex); in worker()
127 uv__queue_insert_tail(&w->loop->wq, &w->wq); in worker()
128 uv_async_send(&w->loop->wq_async); in worker()
129 uv_mutex_unlock(&w->loop->wq_mutex); in worker()
265 void uv__work_submit(uv_loop_t* loop, in uv__work_submit() argument
271 w->loop = loop; in uv__work_submit()
281 static int uv__work_cancel(uv_loop_t* loop, uv_req_t* req, struct uv__work* w) { in uv__work_cancel() argument
286 uv_mutex_lock(&w->loop->wq_mutex); in uv__work_cancel()
292 uv_mutex_unlock(&w->loop->wq_mutex); in uv__work_cancel()
299 uv_mutex_lock(&loop->wq_mutex); in uv__work_cancel()
300 uv__queue_insert_tail(&loop->wq, &w->wq); in uv__work_cancel()
301 uv_async_send(&loop->wq_async); in uv__work_cancel()
302 uv_mutex_unlock(&loop->wq_mutex); in uv__work_cancel()
310 uv_loop_t* loop; in uv__work_done() local
316 loop = container_of(handle, uv_loop_t, wq_async); in uv__work_done()
317 uv_mutex_lock(&loop->wq_mutex); in uv__work_done()
318 uv__queue_move(&loop->wq, &wq); in uv__work_done()
319 uv_mutex_unlock(&loop->wq_mutex); in uv__work_done()
341 uv__metrics_inc_events(loop, nevents - 1); in uv__work_done()
342 if (uv__get_internal_fields(loop)->current_timeout == 0) in uv__work_done()
343 uv__metrics_inc_events_waiting(loop, nevents - 1); in uv__work_done()
359 uv__req_unregister(req->loop); in uv__queue_done()
368 int uv_queue_work(uv_loop_t* loop, in uv_queue_work() argument
375 uv__req_init(loop, req, UV_WORK); in uv_queue_work()
376 req->loop = loop; in uv_queue_work()
379 uv__work_submit(loop, in uv_queue_work()
390 uv_loop_t* loop; in uv_cancel() local
394 loop = ((uv_fs_t*) req)->loop; in uv_cancel()
398 loop = ((uv_getaddrinfo_t*) req)->loop; in uv_cancel()
402 loop = ((uv_getnameinfo_t*) req)->loop; in uv_cancel()
406 loop = ((uv_random_t*) req)->loop; in uv_cancel()
410 loop = ((uv_work_t*) req)->loop; in uv_cancel()
417 return uv__work_cancel(loop, req, wreq); in uv_cancel()