Home
last modified time | relevance | path

Searched refs:handle (Results 1 – 25 of 243) sorted by relevance

12345678910

/libuv/src/win/
H A Dhandle-inl.h84 (handle)->close_cb((uv_handle_t*) (handle)); \
90 handle->flags |= UV_HANDLE_ENDGAME_QUEUED; in uv__want_endgame()
93 loop->endgame_handles = handle; in uv__want_endgame()
99 uv_handle_t* handle; in uv__process_endgames() local
102 handle = loop->endgame_handles; in uv__process_endgames()
107 switch (handle->type) { in uv__process_endgames()
129 uv__timer_close((uv_timer_t*) handle); in uv__process_endgames()
130 uv__handle_close(handle); in uv__process_endgames()
173 HANDLE handle; in uv__get_osfhandle() local
175 handle = (HANDLE) _get_osfhandle(fd); in uv__get_osfhandle()
[all …]
H A Dpoll.c86 handle->submitted_events_1 = handle->events; in uv__fast_poll_submit_poll_req()
88 handle->mask_events_2 = handle->events; in uv__fast_poll_submit_poll_req()
92 handle->submitted_events_2 = handle->events; in uv__fast_poll_submit_poll_req()
93 handle->mask_events_1 = handle->events; in uv__fast_poll_submit_poll_req()
190 handle->poll_cb(handle, 0, events); in uv__fast_poll_process_poll_req()
344 handle->submitted_events_1 = handle->events; in uv__slow_poll_submit_poll_req()
346 handle->mask_events_2 = handle->events; in uv__slow_poll_submit_poll_req()
350 handle->mask_events_1 = handle->events; in uv__slow_poll_submit_poll_req()
395 handle->poll_cb(handle, 0, events); in uv__slow_poll_process_poll_req()
477 handle->poll_req_1.data = handle; in uv_poll_init_socket()
[all …]
H A Dsignal.c82 uv_signal_t* handle; in RB_GENERATE_STATIC() local
93 handle != NULL && handle->signum == signum; in RB_GENERATE_STATIC()
94 handle = RB_NEXT(uv_signal_tree_s, handle)) { in RB_GENERATE_STATIC()
102 POST_COMPLETION_FOR_REQ(handle->loop, &handle->signal_req); in RB_GENERATE_STATIC()
150 handle->signum = 0; in uv_signal_init()
154 handle->signal_req.data = handle; in uv_signal_init()
164 if (handle->signum == 0) in uv_signal_stop()
174 handle->signum = 0; in uv_signal_stop()
175 uv__handle_stop(handle); in uv_signal_stop()
249 handle->signal_cb(handle, dispatched_signum); in uv__process_signal_req()
[all …]
H A Dfs-event.c147 handle->dirw = NULL; in uv_fs_event_init()
150 handle->req.data = handle; in uv_fs_event_init()
172 handle->cb = cb; in uv_fs_event_start()
174 if (!handle->path) { in uv_fs_event_start()
326 if (handle->path) { in uv_fs_event_start()
542 handle->cb(handle, filename, UV_RENAME, 0); in uv__process_fs_event_req()
546 handle->cb(handle, filename, UV_CHANGE, 0); in uv__process_fs_event_req()
560 handle->cb(handle, NULL, UV_CHANGE, 0); in uv__process_fs_event_req()
579 handle->cb(handle, filename, UV_RENAME, 0); in uv__process_fs_event_req()
581 handle->cb(handle, NULL, 0, uv_translate_sys_error(err)); in uv__process_fs_event_req()
[all …]
H A Dtty.c247 tty->handle = handle; in uv_tty_init()
457 assert(handle->handle && handle->handle != INVALID_HANDLE_VALUE); in uv__tty_queue_read_raw()
582 assert(handle->handle && handle->handle != INVALID_HANDLE_VALUE); in uv__tty_queue_read_line()
588 handle->alloc_cb((uv_handle_t*) handle, 8192, &handle->tty.rd.read_line_buffer); in uv__tty_queue_read_line()
591 handle->read_cb((uv_stream_t*) handle, in uv__tty_queue_read_line()
713 handle->read_cb((uv_stream_t*)handle, in uv_process_tty_read_raw_req()
724 handle->read_cb((uv_stream_t*)handle, in uv_process_tty_read_raw_req()
1197 if (!WriteConsoleW(handle->handle, in uv__tty_emit_text()
2181 req->handle = (uv_stream_t*) handle;
2247 CloseHandle(handle->handle);
[all …]
H A Dudp.c130 handle->activecnt = 0; in uv__udp_init_ex()
136 handle->recv_req.data = handle; in uv__udp_init_ex()
153 err = uv__udp_set_socket(handle->loop, handle, sock, domain); in uv__udp_init_ex()
220 err = uv__udp_set_socket(handle->loop, handle, sock, addr->sa_family); in uv__udp_maybe_bind()
286 result = handle->func_wsarecv(handle->socket, in uv__udp_queue_recv()
365 req->handle = handle; in uv__send()
441 handle->recv_cb(handle, in uv__process_udp_recv_req()
461 handle->recv_cb(handle, UV_ENOBUFS, &buf, NULL, 0); in uv__process_udp_recv_req()
487 handle->recv_cb(handle, in uv__process_udp_recv_req()
494 handle->recv_cb(handle, 0, &buf, NULL, 0); in uv__process_udp_recv_req()
[all …]
H A Dtcp.c380 handle = (uv_tcp_t*)req->handle; in post_write_completion()
435 success = handle->tcp.serv.func_acceptex(handle->socket, in uv__tcp_queue_accept()
830 req->handle = (uv_stream_t*) handle; in uv__tcp_try_connect()
842 success = handle->tcp.conn.func_connectex(handle->socket, in uv__tcp_try_connect()
901 req->handle = (uv_stream_t*) handle; in uv__tcp_write()
1010 handle->read_cb((uv_stream_t*)handle, in uv__process_tcp_read_req()
1019 handle->read_cb((uv_stream_t*)handle, in uv__process_tcp_read_req()
1035 handle->read_cb((uv_stream_t*)handle, UV_EOF, &handle->tcp.conn.read_buffer); in uv__process_tcp_read_req()
1078 handle->read_cb((uv_stream_t*)handle, 0, &buf); in uv__process_tcp_read_req()
1091 handle->read_cb((uv_stream_t*)handle, in uv__process_tcp_read_req()
[all …]
H A Dhandle.c32 HANDLE handle; in uv_guess_handle() local
39 handle = uv__get_osfhandle(file); in uv_guess_handle()
41 switch (GetFileType(handle)) { in uv_guess_handle()
68 uv_loop_t* loop = handle->loop; in uv_close()
75 handle->close_cb = cb; in uv_close()
78 switch (handle->type) { in uv_close()
101 uv__handle_closing(handle); in uv_close()
107 uv__handle_closing(handle); in uv_close()
113 uv__handle_closing(handle); in uv_close()
119 uv__handle_closing(handle); in uv_close()
[all …]
H A Dpipe.c118 handle->handle = INVALID_HANDLE_VALUE; in uv_pipe_init()
134 handle->read_req.data = handle; in uv__pipe_connection_init()
533 handle->handle = pipeHandle; in uv__set_pipe_handle()
567 handle->handle = req->pipeHandle; in pipe_alloc_accept()
580 handle = (uv_pipe_t*) req->handle; in pipe_shutdown_thread_proc()
585 FlushFileBuffers(handle->handle); in pipe_shutdown_thread_proc()
823 handle = (uv_pipe_t*) req->handle; in pipe_connect_thread_proc()
1326 result = WriteFile(handle->handle, in uv_pipe_writefile_thread_proc()
1366 handle = (uv_tcp_t*)req->handle; in post_completion_write_wait()
1931 if (!ReadFile(handle->handle, in uv__pipe_read_exactly()
[all …]
H A Dasync.c33 !handle->async_sent) { in uv__async_endgame()
35 uv__handle_close(handle); in uv__async_endgame()
44 handle->async_sent = 0; in uv_async_init()
45 handle->async_cb = async_cb; in uv_async_init()
47 req = &handle->async_req; in uv_async_init()
49 req->data = handle; in uv_async_init()
51 uv__handle_start(handle); in uv_async_init()
62 uv__handle_closing(handle); in uv__async_close()
67 uv_loop_t* loop = handle->loop; in uv_async_send()
91 handle->async_sent = 0; in uv__process_async_wakeup_req()
[all …]
H A Dloop-watcher.c29 void uv__loop_watcher_endgame(uv_loop_t* loop, uv_handle_t* handle) { in uv__loop_watcher_endgame() argument
30 if (handle->flags & UV_HANDLE_CLOSING) { in uv__loop_watcher_endgame()
31 assert(!(handle->flags & UV_HANDLE_CLOSED)); in uv__loop_watcher_endgame()
32 handle->flags |= UV_HANDLE_CLOSED; in uv__loop_watcher_endgame()
33 uv__handle_close(handle); in uv__loop_watcher_endgame()
39 int uv_##name##_init(uv_loop_t* loop, uv_##name##_t* handle) { \
40 uv__handle_init(loop, (uv_handle_t*) handle, UV_##NAME); \
46 int uv_##name##_start(uv_##name##_t* handle, uv_##name##_cb cb) { \
95 handle->name##_prev->name##_next = handle->name##_next; \
98 handle->name##_next->name##_prev = handle->name##_prev; \
[all …]
H A Dstream.c76 switch (handle->type) { in uv__read_start()
101 if (handle->type == UV_TTY) { in uv_read_stop()
107 DECREASE_ACTIVE_COUNT(handle->loop, handle); in uv_read_stop()
115 uv_stream_t* handle, in uv_write() argument
119 uv_loop_t* loop = handle->loop; in uv_write()
127 switch (handle->type) { in uv_write()
152 uv_loop_t* loop = handle->loop; in uv_write2()
159 if (handle->type != UV_NAMED_PIPE || !((uv_pipe_t*) handle)->ipc) { in uv_write2()
208 uv__is_closing(handle)) { in uv_shutdown()
213 req->handle = handle; in uv_shutdown()
[all …]
H A Dinternal.h96 void uv__tcp_endgame(uv_loop_t* loop, uv_tcp_t* handle);
98 int uv__tcp_xfer_export(uv_tcp_t* handle,
114 void uv__udp_close(uv_loop_t* loop, uv_udp_t* handle);
115 void uv__udp_endgame(uv_loop_t* loop, uv_udp_t* handle);
128 void uv__pipe_read_stop(uv_pipe_t* handle);
131 uv_pipe_t* handle,
160 int uv__tty_read_stop(uv_tty_t* handle);
165 void uv__tty_close(uv_tty_t* handle);
185 int uv__poll_close(uv_loop_t* loop, uv_poll_t* handle);
242 uv_fs_event_t* handle);
[all …]
H A Dstream-inl.h34 uv_stream_t* handle, in uv__stream_init() argument
36 uv__handle_init(loop, (uv_handle_t*) handle, type); in uv__stream_init()
37 handle->write_queue_size = 0; in uv__stream_init()
38 handle->activecnt = 0; in uv__stream_init()
39 handle->stream.conn.shutdown_req = NULL; in uv__stream_init()
40 handle->stream.conn.write_reqs_pending = 0; in uv__stream_init()
42 UV_REQ_INIT(&handle->read_req, UV_READ); in uv__stream_init()
43 handle->read_req.event_handle = NULL; in uv__stream_init()
44 handle->read_req.wait_handle = INVALID_HANDLE_VALUE; in uv__stream_init()
45 handle->read_req.data = handle; in uv__stream_init()
[all …]
H A Dprocess-stdio.c75 HANDLE handle; in uv_disable_stdio_inheritance() local
80 if (handle != NULL && handle != INVALID_HANDLE_VALUE) in uv_disable_stdio_inheritance()
84 if (handle != NULL && handle != INVALID_HANDLE_VALUE) in uv_disable_stdio_inheritance()
88 if (handle != NULL && handle != INVALID_HANDLE_VALUE) in uv_disable_stdio_inheritance()
108 handle == NULL || in uv__duplicate_handle()
132 HANDLE handle; in uv__duplicate_fd() local
146 HANDLE handle; in uv__create_nul_handle() local
164 *handle_ptr = handle; in uv__create_nul_handle()
365 CloseHandle(handle); in uv__stdio_destroy()
416 HANDLE handle; in uv__stdio_handle() local
[all …]
/libuv/src/
H A Dtimer.c61 handle->timeout = 0; in uv_timer_init()
62 handle->repeat = 0; in uv_timer_init()
77 uv_timer_stop(handle); in uv_timer_start()
83 handle->timer_cb = cb; in uv_timer_start()
87 handle->start_id = handle->loop->timer_counter++; in uv_timer_start()
117 if (handle->repeat) { in uv_timer_again()
119 uv_timer_start(handle, handle->timer_cb, handle->repeat, handle->repeat); in uv_timer_again()
137 if (handle->loop->time >= handle->timeout) in uv_timer_get_due_in()
140 return handle->timeout - handle->loop->time; in uv_timer_get_due_in()
167 uv_timer_t* handle; in uv__run_timers() local
[all …]
H A Dfs-poll.c61 handle->poll_ctx = NULL; in uv_fs_poll_init()
78 loop = handle->loop; in uv_fs_poll_start()
105 handle->poll_ctx = ctx; in uv_fs_poll_start()
122 ctx = handle->poll_ctx; in uv_fs_poll_stop()
132 uv__handle_stop(handle); in uv_fs_poll_stop()
147 ctx = handle->poll_ctx; in uv_fs_poll_getpath()
189 uv_fs_poll_t* handle; in poll_cb() local
194 if (!uv_is_active((uv_handle_t*)handle) || uv__is_closing(handle)) in poll_cb()
220 if (!uv_is_active((uv_handle_t*)handle) || uv__is_closing(handle)) { in poll_cb()
238 uv_fs_poll_t* handle; in timer_close_cb() local
[all …]
/libuv/src/unix/
H A Dudp.c53 uv__io_close(handle->loop, &handle->io_watcher); in uv__udp_close()
126 uv__io_stop(handle->loop, &handle->io_watcher, POLLOUT); in uv__udp_run_completed()
191 handle->recv_cb(handle, 0, buf, NULL, 0); in uv__udp_recvmmsg()
193 handle->recv_cb(handle, UV__ERR(errno), buf, NULL, 0); in uv__udp_recvmmsg()
202 handle->recv_cb(handle, in uv__udp_recvmmsg()
239 handle->recv_cb(handle, UV_ENOBUFS, &buf, NULL, 0); in uv__udp_recvmsg()
265 handle->recv_cb(handle, 0, &buf, NULL, 0); in uv__udp_recvmsg()
328 uv__io_feed(handle->loop, &handle->io_watcher); in uv__udp_sendmsg_one()
397 uv__io_feed(handle->loop, &handle->io_watcher); in uv__udp_sendmsg_many()
423 uv__io_feed(handle->loop, &handle->io_watcher); in uv__udp_sendmsg_many()
[all …]
H A Dpoll.c31 uv_poll_t* handle; in uv__poll_io() local
50 handle->poll_cb(handle, UV_EBADF, 0); in uv__poll_io()
64 handle->poll_cb(handle, 0, pevents); in uv__poll_io()
92 handle->poll_cb = NULL; in uv_poll_init()
107 uv__handle_stop(handle); in uv__poll_stop()
108 uv__platform_invalidate_fd(handle->loop, handle->io_watcher.fd); in uv__poll_stop()
114 uv__poll_stop(handle); in uv_poll_stop()
129 w = &handle->io_watcher; in uv_poll_start()
135 uv__poll_stop(handle); in uv_poll_start()
150 uv__io_start(handle->loop, &handle->io_watcher, events); in uv_poll_start()
[all …]
H A Dsignal.c36 uv_signal_t* handle; member
168 uv_signal_t* handle; in uv__signal_first_handle() local
176 if (handle != NULL && handle->signum == signum) in uv__signal_first_handle()
177 return handle; in uv__signal_first_handle()
185 uv_signal_t* handle; in uv__signal_handler() local
197 handle != NULL && handle->signum == signum; in uv__signal_handler()
198 handle = RB_NEXT(uv__signal_tree_s, handle)) { in uv__signal_handler()
202 msg.handle = handle; in uv__signal_handler()
344 handle->signum = 0; in uv_signal_init()
474 handle = msg->handle; in uv__signal_event()
[all …]
H A Dpipe.c51 handle->ipc = ipc; in uv_pipe_init()
155 if (handle->ipc) in uv__pipe_listen()
172 uv__io_start(handle->loop, &handle->io_watcher, POLLIN); in uv__pipe_listen()
243 req->handle = (uv_stream_t*) handle; in uv_pipe_connect()
248 uv__io_feed(handle->loop, &handle->io_watcher); in uv_pipe_connect()
329 uv__io_start(handle->loop, &handle->io_watcher, POLLOUT); in uv_pipe_connect2()
336 req->handle = (uv_stream_t*) handle; in uv_pipe_connect2()
342 uv__io_feed(handle->loop, &handle->io_watcher); in uv_pipe_connect2()
422 if (!handle->ipc) in uv_pipe_pending_count()
437 if (!handle->ipc) in uv_pipe_pending_type()
[all …]
H A Dfsevents.c84 uv_fs_event_t* handle; member
186 handle = cb->data; in uv__fsevents_cb()
271 if (memcmp(path, handle->realpath, handle->realpath_len) != 0) in uv__fsevents_event_cb()
274 if (!(handle->realpath_len == 1 && handle->realpath[0] == '/')) { in uv__fsevents_event_cb()
773 item->handle = handle; in uv__cf_loop_signal()
808 handle->realpath_len = strlen(handle->realpath); in uv__fsevents_init()
818 handle->cf_cb = uv__malloc(sizeof(*handle->cf_cb)); in uv__fsevents_init()
824 handle->cf_cb->data = handle; in uv__fsevents_init()
825 uv_async_init(handle->loop, handle->cf_cb, uv__fsevents_cb); in uv__fsevents_init()
843 err = uv__cf_loop_signal(handle->loop, handle, kUVCFLoopSignalRegular); in uv__fsevents_init()
[all …]
H A Dtcp.c92 sockfd = uv__stream_fd(handle); in maybe_new_socket()
108 handle->flags |= flags; in maybe_new_socket()
294 err = maybe_new_socket(handle, in uv__tcp_connect()
339 req->handle = (uv_stream_t*) handle; in uv__tcp_connect()
341 handle->connect_req = req; in uv__tcp_connect()
343 uv__io_start(handle->loop, &handle->io_watcher, POLLOUT); in uv__tcp_connect()
345 if (handle->delayed_error) in uv__tcp_connect()
346 uv__io_feed(handle->loop, &handle->io_watcher); in uv__tcp_connect()
372 if (handle->delayed_error) in uv_tcp_getsockname()
386 if (handle->delayed_error) in uv_tcp_getpeername()
[all …]
H A Dloop-watcher.c26 int uv_##name##_init(uv_loop_t* loop, uv_##name##_t* handle) { \
27 uv__handle_init(loop, (uv_handle_t*)handle, UV_##type); \
28 handle->name##_cb = NULL; \
32 int uv_##name##_start(uv_##name##_t* handle, uv_##name##_cb cb) { \
33 if (uv__is_active(handle)) return 0; \
35 uv__queue_insert_head(&handle->loop->name##_handles, &handle->queue); \
36 handle->name##_cb = cb; \
37 uv__handle_start(handle); \
41 int uv_##name##_stop(uv_##name##_t* handle) { \
42 if (!uv__is_active(handle)) return 0; \
[all …]
/libuv/test/
H A Dtest-timer.c44 ASSERT_NOT_NULL(handle); in once_close_cb()
45 ASSERT_OK(uv_is_active(handle)); in once_close_cb()
54 ASSERT_NOT_NULL(handle); in once_cb()
68 ASSERT_NOT_NULL(handle); in twice_close_cb()
77 ASSERT_NOT_NULL(handle); in twice_cb()
90 ASSERT_NOT_NULL(handle); in repeat_close_cb()
99 ASSERT_NOT_NULL(handle); in repeat_cb()
185 uv_timer_t handle; in TEST_IMPL() local
248 uv_stop(handle->loop); in zero_timeout_cb()
353 uv_timer_t handle; in TEST_IMPL() local
[all …]

Completed in 96 milliseconds

12345678910