Lines Matching refs:req
57 static void work_cb(uv_work_t* req) { in work_cb() argument
58 uv_sem_wait(pause_sems + (req - pause_reqs)); in work_cb()
62 static void done_cb(uv_work_t* req, int status) { in done_cb() argument
63 uv_sem_destroy(pause_sems + (req - pause_reqs)); in done_cb()
94 static int known_broken(uv_req_t* req) { in known_broken() argument
95 if (req->type != UV_FS) in known_broken()
100 switch (((uv_fs_t*) req)->fs_type) { in known_broken()
125 static void fs_cb(uv_fs_t* req) { in fs_cb() argument
126 ASSERT_NE(known_broken((uv_req_t*) req) || \ in fs_cb()
127 req->result == UV_ECANCELED, 0); in fs_cb()
128 uv_fs_req_cleanup(req); in fs_cb()
133 static void getaddrinfo_cb(uv_getaddrinfo_t* req, in getaddrinfo_cb() argument
152 static void work2_cb(uv_work_t* req) { in work2_cb() argument
157 static void done2_cb(uv_work_t* req, int status) { in done2_cb() argument
165 uv_req_t* req; in timer_cb() local
171 req = (uv_req_t*) ((char*) ci->reqs + i * ci->stride); in timer_cb()
172 ASSERT(known_broken(req) || 0 == uv_cancel(req)); in timer_cb()
181 static void nop_done_cb(uv_work_t* req, int status) { in nop_done_cb() argument
187 static void nop_random_cb(uv_random_t* req, int status, void* buf, size_t len) { in nop_random_cb() argument
190 ri = container_of(req, struct random_info, random_req); in nop_random_cb()
270 struct random_info req; in TEST_IMPL() local
276 &req.random_req, in TEST_IMPL()
277 &req.buf, in TEST_IMPL()
278 sizeof(req.buf), in TEST_IMPL()
281 ASSERT_OK(uv_cancel((uv_req_t*) &req)); in TEST_IMPL()
372 uv_work_t req; in TEST_IMPL() local
376 ASSERT_OK(uv_queue_work(loop, &req, (uv_work_cb) abort, nop_done_cb)); in TEST_IMPL()
377 ASSERT_OK(uv_cancel((uv_req_t*) &req)); in TEST_IMPL()
388 static void after_busy_cb(uv_work_t* req, int status) { in after_busy_cb() argument
393 static void busy_cb(uv_work_t* req) { in busy_cb() argument
394 uv_sem_post((uv_sem_t*) req->data); in busy_cb()
401 uv_work_t req; in TEST_IMPL() local
403 req.data = &sem_lock; in TEST_IMPL()
406 ASSERT_OK(uv_queue_work(uv_default_loop(), &req, busy_cb, after_busy_cb)); in TEST_IMPL()
410 ASSERT_EQ(uv_cancel((uv_req_t*) &req), UV_EBUSY); in TEST_IMPL()