Lines Matching refs:req
281 static int uv__work_cancel(uv_loop_t* loop, uv_req_t* req, struct uv__work* w) { in uv__work_cancel() argument
349 uv_work_t* req = container_of(w, uv_work_t, work_req); in uv__queue_work() local
351 req->work_cb(req); in uv__queue_work()
356 uv_work_t* req; in uv__queue_done() local
358 req = container_of(w, uv_work_t, work_req); in uv__queue_done()
359 uv__req_unregister(req->loop); in uv__queue_done()
361 if (req->after_work_cb == NULL) in uv__queue_done()
364 req->after_work_cb(req, err); in uv__queue_done()
369 uv_work_t* req, 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()
377 req->work_cb = work_cb; in uv_queue_work()
378 req->after_work_cb = after_work_cb; in uv_queue_work()
380 &req->work_req, in uv_queue_work()
388 int uv_cancel(uv_req_t* req) { in uv_cancel() argument
392 switch (req->type) { in uv_cancel()
394 loop = ((uv_fs_t*) req)->loop; in uv_cancel()
395 wreq = &((uv_fs_t*) req)->work_req; in uv_cancel()
398 loop = ((uv_getaddrinfo_t*) req)->loop; in uv_cancel()
399 wreq = &((uv_getaddrinfo_t*) req)->work_req; in uv_cancel()
402 loop = ((uv_getnameinfo_t*) req)->loop; in uv_cancel()
403 wreq = &((uv_getnameinfo_t*) req)->work_req; in uv_cancel()
406 loop = ((uv_random_t*) req)->loop; in uv_cancel()
407 wreq = &((uv_random_t*) req)->work_req; in uv_cancel()
410 loop = ((uv_work_t*) req)->loop; in uv_cancel()
411 wreq = &((uv_work_t*) req)->work_req; in uv_cancel()
417 return uv__work_cancel(loop, req, wreq); in uv_cancel()