/libuv/src/win/ |
H A D | req-inl.h | 91 req->next_req = NULL; in uv__insert_pending_req() 108 req->next_req = req; in uv__insert_pending_req() 142 uv_req_t* req; in uv__process_reqs() local 154 req = next; in uv__process_reqs() 155 next = req->next_req != first ? req->next_req : NULL; in uv__process_reqs() 157 switch (req->type) { in uv__process_reqs() 179 uv__process_udp_recv_req(loop, (uv_udp_t*) req->data, req); in uv__process_reqs() 189 uv__process_async_wakeup_req(loop, (uv_async_t*) req->data, req); in uv__process_reqs() 193 uv__process_signal_req(loop, (uv_signal_t*) req->data, req); in uv__process_reqs() 197 uv__process_poll_req(loop, (uv_poll_t*) req->data, req); in uv__process_reqs() [all …]
|
H A D | fs.c | 395 req->cb = cb; in uv__fs_req_init() 396 memset(&req->fs, 0, sizeof(req->fs)); in uv__fs_req_init() 2006 req->ptr = &req->statbuf; in fs__stat_impl() 2072 req->ptr = &req->statbuf; in fs__fstat() 2226 int fd_in = req->file.fd, fd_out = req->fs.info.fd_out; in fs__sendfile() 2299 int result = _wchmod(req->file.pathw, req->fs.info.mode); in fs__chmod() 2984 req->cb(req); in uv__fs_done() 2999 if (req->fs_type == UV_FS_SCANDIR && req->ptr != NULL) in uv_fs_req_cleanup() 3007 if (req->fs.info.bufs != req->fs.info.bufsml) in uv_fs_req_cleanup() 3061 req->fs.info.bufs = req->fs.info.bufsml; in uv_fs_read() [all …]
|
H A D | getnameinfo.c | 42 uv_getnameinfo_t* req; in uv__getnameinfo_work() local 64 req->retcode = ret; in uv__getnameinfo_work() 71 req->retcode = ret; in uv__getnameinfo_work() 80 uv_getnameinfo_t* req; in uv__getnameinfo_done() local 92 host = req->host; in uv__getnameinfo_done() 97 req->getnameinfo_cb(req, req->retcode, host, service); in uv__getnameinfo_done() 115 memcpy(&req->storage, in uv_getnameinfo() 130 req->flags = flags; in uv_getnameinfo() 131 req->loop = loop; in uv_getnameinfo() 132 req->retcode = 0; in uv_getnameinfo() [all …]
|
H A D | getaddrinfo.c | 90 err = GetAddrInfoW(req->node, req->service, hints, &req->addrinfow); in uv__getaddrinfo_work() 108 uv__free(req->alloc); in uv__getaddrinfo_done() 109 req->alloc = NULL; in uv__getaddrinfo_done() 215 req->getaddrinfo_cb(req, req->retcode, req->addrinfo); in uv__getaddrinfo_done() 262 req->loop = loop; in uv_getaddrinfo() 263 req->retcode = 0; in uv_getaddrinfo() 297 if (!req->alloc) in uv_getaddrinfo() 303 req->node = (WCHAR*) req->alloc; in uv_getaddrinfo() 306 req->node = NULL; in uv_getaddrinfo() 312 req->service = (WCHAR*) ((char*) req->alloc + serviceoff); in uv_getaddrinfo() [all …]
|
H A D | tcp.c | 209 assert(req); in uv__process_tcp_shutdown_req() 226 if (req->cb) in uv__process_tcp_shutdown_req() 227 req->cb(req, err); in uv__process_tcp_shutdown_req() 356 uv_req_t* req; in post_completion() local 456 req->event_handle, post_completion, (void*) req, in uv__tcp_queue_accept() 521 req->event_handle, post_completion, (void*) req, in uv__tcp_queue_read() 647 if (!req) { in uv__tcp_accept() 831 req->cb = cb; in uv__tcp_try_connect() 902 req->cb = cb; in uv__tcp_write() 1139 req->cb(req, err); in uv__process_tcp_write_req() [all …]
|
H A D | pipe.c | 579 assert(req); in pipe_shutdown_thread_proc() 822 assert(req); in pipe_connect_thread_proc() 892 req->cb = cb; in uv_pipe_connect2() 1479 req->next_req = (uv_req_t*)req; in uv__insert_non_overlapped_write_req() 1508 if (req) { in uv__queue_non_overlapped_write() 2202 container_of(req, uv__coalesced_write_t, req); in uv__process_pipe_write_req() 2207 req->cb(req, uv_translate_sys_error(err)); in uv__process_pipe_write_req() 2285 if (req->cb) in uv__process_pipe_connect_req() 2286 req->cb(req, err); in uv__process_pipe_connect_req() 2329 if (req->cb) in uv__process_pipe_shutdown_req() [all …]
|
/libuv/src/unix/ |
H A D | getnameinfo.c | 32 uv_getnameinfo_t* req; in uv__getnameinfo_work() local 56 uv_getnameinfo_t* req; in uv__getnameinfo_done() local 68 host = req->host; in uv__getnameinfo_done() 72 if (req->getnameinfo_cb) in uv__getnameinfo_done() 73 req->getnameinfo_cb(req, req->retcode, host, service); in uv__getnameinfo_done() 90 memcpy(&req->storage, in uv_getnameinfo() 94 memcpy(&req->storage, in uv_getnameinfo() 104 req->flags = flags; in uv_getnameinfo() 106 req->loop = loop; in uv_getnameinfo() 107 req->retcode = 0; in uv_getnameinfo() [all …]
|
H A D | fs.c | 372 return open(req->path, req->flags | O_CLOEXEC, req->mode); in uv__fs_open() 379 r = open(req->path, req->flags, req->mode); in uv__fs_open() 560 if (req->bufs != req->bufsml) in uv__fs_read() 1680 req->bufs += req->nbufs; in uv__fs_write_all() 1715 X(CHOWN, chown(req->path, req->uid, req->gid)); in uv__fs_work() 1719 X(FCHOWN, fchown(req->file, req->uid, req->gid)); in uv__fs_work() 1720 X(LCHOWN, lchown(req->path, req->uid, req->gid)); in uv__fs_work() 1762 req->ptr = &req->statbuf; in uv__fs_work() 1778 req->cb(req); in uv__fs_done() 2051 req->bufs = req->bufsml; in uv_fs_read() [all …]
|
H A D | getaddrinfo.c | 103 err = getaddrinfo(req->hostname, req->service, req->hints, &req->addrinfo); in uv__getaddrinfo_work() 115 if (req->hints) in uv__getaddrinfo_done() 124 req->hints = NULL; in uv__getaddrinfo_done() 125 req->service = NULL; in uv__getaddrinfo_done() 133 if (req->cb) in uv__getaddrinfo_done() 134 req->cb(req, req->retcode, req->addrinfo); in uv__getaddrinfo_done() 181 req->loop = loop; in uv_getaddrinfo() 182 req->cb = cb; in uv_getaddrinfo() 184 req->hints = NULL; in uv_getaddrinfo() 185 req->service = NULL; in uv_getaddrinfo() [all …]
|
H A D | stream.c | 657 req->cb(req, err); in uv__drain() 674 size = uv__count_bufs(req->bufs + req->write_index, in uv__write_req_size() 697 buf = req->bufs + req->write_index; in uv__write_req_update() 708 req->write_index = buf - req->bufs; in uv__write_req_update() 710 return req->write_index == req->nbufs; in uv__write_req_update() 727 if (req->bufs != req->bufsml) in uv__write_req_finish() 864 req->nbufs - req->write_index, in uv__write() 920 if (req->bufs != req->bufsml) in uv__write_callbacks() 927 req->cb(req, req->error); in uv__write_callbacks() 1283 req->cb(req, error); in uv__stream_connect() [all …]
|
/libuv/test/ |
H A D | test-fs-copyfile.c | 54 ASSERT_OK(req->result); in handle_result() 71 uv_fs_req_cleanup(req); in handle_result() 78 uv_fs_t req; in touch_file() local 108 uv_fs_t req; in TEST_IMPL() local 146 handle_result(&req); in TEST_IMPL() 153 handle_result(&req); in TEST_IMPL() 158 handle_result(&req); in TEST_IMPL() 173 handle_result(&req); in TEST_IMPL() 180 handle_result(&req); in TEST_IMPL() 204 handle_result(&req); in TEST_IMPL() [all …]
|
H A D | test-fs.c | 173 uv_fs_t req; in check_permission() local 196 (void) req; in dummy_cb() 311 ASSERT(req->result == 0 || req->result == UV_EPERM); in chown_root_cb() 720 uv_fs_t req; in TEST_IMPL() local 745 uv_fs_t req; in TEST_IMPL() local 771 uv_fs_t req; in TEST_IMPL() local 817 uv_fs_t req; in check_utime() local 1253 uv_fs_t req; in test_sendfile() local 1500 memset(&req.statbuf, 0xaa, sizeof(req.statbuf)); in TEST_IMPL() 2956 memset(&req, 0xdb, sizeof(req)); in TEST_IMPL() [all …]
|
H A D | test-fs-readdir.c | 38 uv_fs_t req; in cleanup_test_files() local 53 ASSERT_OK(req->result); in empty_closedir_cb() 55 uv_fs_req_cleanup(req); in empty_closedir_cb() 64 ASSERT_OK(req->result); in empty_readdir_cb() 65 dir = req->ptr; in empty_readdir_cb() 82 dir = req->ptr; in empty_opendir_cb() 288 dir = req->ptr; in non_empty_readdir_cb() 332 dir = req->ptr; in non_empty_opendir_cb() 470 dir = req->ptr; in readdir_symlink_readdir_cb() 498 dir = req->ptr; in readdir_symlink_opendir_cb() [all …]
|
H A D | benchmark-fs-stat.c | 66 uv_fs_t req; in sync_bench() local 73 sync_stat(&req, path); in sync_bench() 87 uv_fs_req_cleanup(&req->fs_req); in stat_cb() 88 if (*req->count == 0) return; in stat_cb() 89 uv_fs_stat(uv_default_loop(), &req->fs_req, req->path, stat_cb); in stat_cb() 90 (*req->count)--; in stat_cb() 96 struct async_req* req; in async_bench() local 106 for (req = reqs; req < reqs + i; req++) { in async_bench() 107 req->path = path; in async_bench() 108 req->count = &count; in async_bench() [all …]
|
H A D | benchmark-tcp-write-batch.c | 32 uv_write_t req; member 47 static void connect_cb(uv_connect_t* req, int status); 48 static void write_cb(uv_write_t* req, int status); 49 static void shutdown_cb(uv_shutdown_t* req, int status); 53 static void connect_cb(uv_connect_t* req, int status) { in connect_cb() argument 58 ASSERT_PTR_EQ(req->handle, (uv_stream_t*)&tcp_client); in connect_cb() 62 r = uv_write(&w->req, req->handle, &w->buf, 1, write_cb); in connect_cb() 73 static void write_cb(uv_write_t* req, int status) { in write_cb() argument 74 ASSERT_NOT_NULL(req); in write_cb() 82 ASSERT_OK(req->handle->write_queue_size); in shutdown_cb() [all …]
|
H A D | test-threadpool-cancel.c | 57 static void work_cb(uv_work_t* req) { in work_cb() argument 95 if (req->type != UV_FS) in known_broken() 125 static void fs_cb(uv_fs_t* req) { in fs_cb() argument 128 uv_fs_req_cleanup(req); in fs_cb() 165 uv_req_t* req; in timer_cb() local 172 ASSERT(known_broken(req) || 0 == uv_cancel(req)); in timer_cb() 270 struct random_info req; in TEST_IMPL() local 277 &req.buf, in TEST_IMPL() 372 uv_work_t req; in TEST_IMPL() local 401 uv_work_t req; in TEST_IMPL() local [all …]
|
H A D | test-udp-alloc-cb-fail.c | 86 ASSERT_NOT_NULL(req); in cl_send_cb() 88 CHECK_HANDLE(req->handle); in cl_send_cb() 98 ASSERT_NOT_NULL(req); in sv_send_cb() 100 CHECK_HANDLE(req->handle); in sv_send_cb() 102 uv_close((uv_handle_t*) req->handle, close_cb); in sv_send_cb() 103 free(req); in sv_send_cb() 114 uv_udp_send_t* req; in sv_recv_cb() local 138 req = malloc(sizeof *req); in sv_recv_cb() 139 ASSERT_NOT_NULL(req); in sv_recv_cb() 151 uv_udp_send_t req; in TEST_IMPL() local [all …]
|
H A D | echo-server.c | 28 uv_write_t req; member 70 free(req); in after_shutdown() 76 free(req); in on_shutdown() 215 if (req != NULL) in send_alloc() 218 req = malloc(sizeof(*req)); in send_alloc() 219 return req; in send_alloc() 223 ASSERT_NOT_NULL(req); in on_send() 226 send_freelist = req; in on_send() 235 uv_udp_send_t* req; in on_recv() local 245 req = send_alloc(); in on_recv() [all …]
|
H A D | test-udp-send-and-recv.c | 93 ASSERT_NOT_NULL(req); in cl_send_cb() 95 CHECK_HANDLE(req->handle); in cl_send_cb() 105 ASSERT_NOT_NULL(req); in sv_send_cb() 107 CHECK_HANDLE(req->handle); in sv_send_cb() 109 uv_close((uv_handle_t*) req->handle, close_cb); in sv_send_cb() 110 free(req); in sv_send_cb() 121 uv_udp_send_t* req; in sv_recv_cb() local 149 req = malloc(sizeof *req); in sv_recv_cb() 150 ASSERT_NOT_NULL(req); in sv_recv_cb() 162 uv_udp_send_t req; in TEST_IMPL() local [all …]
|
H A D | test-thread.c | 88 if (--req->counter) in getaddrinfo_cb() 89 getaddrinfo_do(req); in getaddrinfo_cb() 96 r = uv_fs_stat(req->loop, &req->handle, ".", fs_cb); in fs_do() 106 if (--req->counter) in fs_cb() 107 fs_do(req); in fs_cb() 122 req->counter = 4; in do_work() 123 req->loop = &loop; in do_work() 124 getaddrinfo_do(req); in do_work() 129 req->counter = 4; in do_work() 130 req->loop = &loop; in do_work() [all …]
|
/libuv/src/ |
H A D | random.c | 74 uv_random_t* req; in uv__random_work() local 77 req->status = uv__random(req->buf, req->buflen); in uv__random_work() 82 uv_random_t* req; in uv__random_done() local 88 status = req->status; in uv__random_done() 90 req->cb(req, status, req->buf, req->buflen); in uv__random_done() 95 uv_random_t* req, in uv_random() argument 110 req->loop = loop; in uv_random() 111 req->status = 0; in uv_random() 112 req->cb = cb; in uv_random() 113 req->buf = buf; in uv_random() [all …]
|
H A D | uv-data-getter-setters.c | 66 return req->type; in uv_req_get_type() 69 void* uv_req_get_data(const uv_req_t* req) { in uv_req_get_data() argument 70 return req->data; in uv_req_get_data() 74 req->data = data; in uv_req_set_data() 94 return req->fs_type; in uv_fs_get_type() 98 return req->result; in uv_fs_get_result() 101 void* uv_fs_get_ptr(const uv_fs_t* req) { in uv_fs_get_ptr() argument 102 return req->ptr; in uv_fs_get_ptr() 106 return req->path; in uv_fs_get_path() 109 uv_stat_t* uv_fs_get_statbuf(uv_fs_t* req) { in uv_fs_get_statbuf() argument [all …]
|
H A D | threadpool.c | 351 req->work_cb(req); in uv__queue_work() 356 uv_work_t* req; in uv__queue_done() local 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 376 req->loop = loop; in uv_queue_work() 377 req->work_cb = 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 [all …]
|
/libuv/docs/code/uvcat/ |
H A D | main.c | 6 void on_read(uv_fs_t *req); 16 void on_write(uv_fs_t *req) { in on_write() argument 17 if (req->result < 0) { in on_write() 25 void on_read(uv_fs_t *req) { in on_read() argument 26 if (req->result < 0) { in on_read() 29 else if (req->result == 0) { in on_read() 34 else if (req->result > 0) { in on_read() 35 iov.len = req->result; in on_read() 40 void on_open(uv_fs_t *req) { in on_open() argument 43 assert(req == &open_req); in on_open() [all …]
|
/libuv/docs/code/uvtee/ |
H A D | main.c | 9 uv_write_t req; member 22 void free_write_req(uv_write_t *req) { in free_write_req() argument 23 write_req_t *wr = (write_req_t*) req; in free_write_req() 28 void on_stdout_write(uv_write_t *req, int status) { in on_stdout_write() argument 29 free_write_req(req); in on_stdout_write() 32 void on_file_write(uv_write_t *req, int status) { in on_file_write() argument 33 free_write_req(req); in on_file_write() 37 write_req_t *req = (write_req_t*) malloc(sizeof(write_req_t)); in write_data() local 38 req->buf = uv_buf_init((char*) malloc(size), size); in write_data() 39 memcpy(req->buf.base, buf.base, size); in write_data() [all …]
|