Home
last modified time | relevance | path

Searched refs:loop (Results 1 – 25 of 211) sorted by relevance

123456789

/libuv/src/unix/
H A Dloop.c37 memset(loop, 0, sizeof(*loop)); in uv_loop_init()
62 loop->nfds = 0; in uv_loop_init()
63 loop->watchers = NULL; in uv_loop_init()
64 loop->nwatchers = 0; in uv_loop_init()
69 uv__update_time(loop); in uv_loop_init()
71 loop->async_wfd = -1; in uv_loop_init()
75 loop->emfile_fd = -1; in uv_loop_init()
78 loop->stop_flag = 0; in uv_loop_init()
98 err = uv_async_init(loop, &loop->wq_async, uv__work_done); in uv_loop_init()
127 loop->nwatchers = 0; in uv_loop_init()
[all …]
H A Dposix-poll.c60 if (loop->poll_fds_used < loop->poll_fds_size) in uv__pollfds_maybe_resize()
63 n = loop->poll_fds_size ? loop->poll_fds_size * 2 : 64; in uv__pollfds_maybe_resize()
64 p = uv__reallocf(loop->poll_fds, n * sizeof(*loop->poll_fds)); in uv__pollfds_maybe_resize()
68 loop->poll_fds = p; in uv__pollfds_maybe_resize()
81 loop->poll_fds[l] = loop->poll_fds[r]; in uv__pollfds_swap()
101 pe = &loop->poll_fds[loop->poll_fds_used++]; in uv__pollfds_add()
114 uv__pollfds_swap(loop, i, loop->poll_fds_used); in uv__pollfds_del()
115 loop->poll_fds[loop->poll_fds_used].fd = -1; in uv__pollfds_del()
116 loop->poll_fds[loop->poll_fds_used].events = 0; in uv__pollfds_del()
117 loop->poll_fds[loop->poll_fds_used].revents = 0; in uv__pollfds_del()
[all …]
H A Dasync.c77 err = uv__async_start(loop); in uv_async_init()
221 fd = loop->async_wfd;
312 uv__io_start(loop, &loop->async_io_watcher, POLLIN);
313 loop->async_wfd = pipefd[1];
319 loop->async_io_watcher.events = loop->async_io_watcher.pevents;
349 if (loop->async_wfd != loop->async_io_watcher.fd)
351 loop->async_wfd = -1;
354 uv__io_stop(loop, &loop->async_io_watcher, POLLIN);
389 if (loop->async_wfd != loop->async_io_watcher.fd)
391 loop->async_wfd = -1;
[all …]
H A Dkqueue.c71 loop->backend_fd = -1; in uv__io_fork()
92 loop->cf_state = NULL; in uv__io_fork()
184 if (loop->nfds == 0) { in uv__io_poll()
254 base = loop->time; in uv__io_poll()
333 loop->watchers[loop->nwatchers] = (void*) events; in uv__io_poll()
334 loop->watchers[loop->nwatchers + 1] = (void*) (uintptr_t) nfds; in uv__io_poll()
443 loop->signal_io_watcher.cb(loop, &loop->signal_io_watcher, POLLIN); in uv__io_poll()
446 loop->watchers[loop->nwatchers] = NULL; in uv__io_poll()
447 loop->watchers[loop->nwatchers + 1] = NULL; in uv__io_poll()
487 events = (struct kevent*) loop->watchers[loop->nwatchers]; in uv__platform_invalidate_fd()
[all …]
H A Dinternal.h267 int uv__io_fork(uv_loop_t* loop);
271 void uv__async_stop(uv_loop_t* loop);
272 int uv__async_fork(uv_loop_t* loop);
276 void uv__run_idle(uv_loop_t* loop);
277 void uv__run_check(uv_loop_t* loop);
313 int uv__kqueue_init(uv_loop_t* loop);
358 int uv__iou_fs_statx(uv_loop_t* loop,
365 #define uv__iou_fs_close(loop, req) 0 argument
368 #define uv__iou_fs_link(loop, req) 0 argument
369 #define uv__iou_fs_mkdir(loop, req) 0 argument
[all …]
H A Dsunos.c71 loop->fs_fd = -1; in uv__platform_loop_init()
92 loop->fs_fd = -1; in uv__platform_loop_delete()
106 uv__io_stop(loop, &loop->fs_event_watcher, POLLIN); in uv__io_fork()
122 events = (struct port_event*) loop->watchers[loop->nwatchers]; in uv__platform_invalidate_fd()
123 nfds = (uintptr_t) loop->watchers[loop->nwatchers + 1]; in uv__platform_invalidate_fd()
201 base = loop->time; in uv__io_poll()
284 loop->watchers[loop->nwatchers] = (void*) events; in uv__io_poll()
285 loop->watchers[loop->nwatchers + 1] = (void*) (uintptr_t) nfds; in uv__io_poll()
332 loop->signal_io_watcher.cb(loop, &loop->signal_io_watcher, POLLIN); in uv__io_poll()
335 loop->watchers[loop->nwatchers] = NULL; in uv__io_poll()
[all …]
H A Dsignal.c172 lookup.loop = NULL; in uv__signal_first_handle()
265 if (loop->signal_pipefd[0] != -1) in uv__signal_loop_once_init()
275 uv__io_start(loop, &loop->signal_io_watcher, POLLIN); in uv__signal_loop_once_init()
284 if (loop->signal_pipefd[0] == -1) in uv__signal_loop_fork()
286 uv__io_stop(loop, &loop->signal_io_watcher, POLLIN); in uv__signal_loop_fork()
289 loop->signal_pipefd[0] = -1; in uv__signal_loop_fork()
290 loop->signal_pipefd[1] = -1; in uv__signal_loop_fork()
326 loop->signal_pipefd[0] = -1; in uv__signal_loop_cleanup()
331 loop->signal_pipefd[1] = -1; in uv__signal_loop_cleanup()
520 if (w1->loop < w2->loop) return -1; in uv__signal_compare()
[all …]
H A Dfsevents.c95 CFRunLoopRef loop; member
228 uv_loop_t* loop; in uv__fsevents_event_cb() local
234 loop = info; in uv__fsevents_event_cb()
235 state = loop->cf_state; in uv__fsevents_event_cb()
338 ctx.info = loop; in uv__fsevents_create_stream()
620 ctx.info = loop; in uv__fsevents_loop_init()
706 uv_loop_t* loop; in uv__cf_loop_runner() local
709 loop = arg; in uv__cf_loop_runner()
724 state->loop = NULL; in uv__cf_loop_runner()
732 uv_loop_t* loop; in uv__cf_loop_cb() local
[all …]
/libuv/src/win/
H A Dcore.c167 uv_loop_t* loop; in uv__wake_all_loops() local
171 loop = uv__loops[i]; in uv__wake_all_loops()
172 assert(loop); in uv__wake_all_loops()
237 if (loop->iocp == NULL) in uv_loop_init()
255 loop->time = 0; in uv_loop_init()
256 uv_update_time(loop); in uv_loop_init()
283 memset(&loop->poll_peer_sockets, 0, sizeof loop->poll_peer_sockets); in uv_loop_init()
286 loop->stop_flag = 0; in uv_loop_init()
292 err = uv_async_init(loop, &loop->wq_async, uv__work_done); in uv_loop_init()
328 loop->time = new_time; in uv_update_time()
[all …]
H A Dreq-inl.h92 if (loop->pending_reqs_tail) { in uv__insert_pending_req()
97 uv_req_t* current = loop->pending_reqs_tail; in uv__insert_pending_req()
101 } while(current != loop->pending_reqs_tail); in uv__insert_pending_req()
105 loop->pending_reqs_tail->next_req = req; in uv__insert_pending_req()
106 loop->pending_reqs_tail = req; in uv__insert_pending_req()
109 loop->pending_reqs_tail = req; in uv__insert_pending_req()
146 if (loop->pending_reqs_tail == NULL) in uv__process_reqs()
149 first = loop->pending_reqs_tail->next_req; in uv__process_reqs()
151 loop->pending_reqs_tail = NULL; in uv__process_reqs()
159 DELEGATE_STREAM_REQ(loop, req, read, data); in uv__process_reqs()
[all …]
H A Dinternal.h91 void uv__process_tcp_shutdown_req(uv_loop_t* loop,
95 void uv__tcp_close(uv_loop_t* loop, uv_tcp_t* tcp);
96 void uv__tcp_endgame(uv_loop_t* loop, uv_tcp_t* handle);
114 void uv__udp_close(uv_loop_t* loop, uv_udp_t* handle);
121 int uv__create_stdio_pipe_pair(uv_loop_t* loop,
129 int uv__pipe_write(uv_loop_t* loop,
173 void uv__process_tty_shutdown_req(uv_loop_t* loop,
194 void uv__prepare_invoke(uv_loop_t* loop);
195 void uv__check_invoke(uv_loop_t* loop);
196 void uv__idle_invoke(uv_loop_t* loop);
[all …]
H A Dhandle-inl.h92 handle->endgame_next = loop->endgame_handles; in uv__want_endgame()
93 loop->endgame_handles = handle; in uv__want_endgame()
101 while (loop->endgame_handles) { in uv__process_endgames()
102 handle = loop->endgame_handles; in uv__process_endgames()
103 loop->endgame_handles = handle->endgame_next; in uv__process_endgames()
109 uv__tcp_endgame(loop, (uv_tcp_t*) handle); in uv__process_endgames()
113 uv__pipe_endgame(loop, (uv_pipe_t*) handle); in uv__process_endgames()
117 uv__tty_endgame(loop, (uv_tty_t*) handle); in uv__process_endgames()
121 uv__udp_endgame(loop, (uv_udp_t*) handle); in uv__process_endgames()
125 uv__poll_endgame(loop, (uv_poll_t*) handle); in uv__process_endgames()
[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
39 int uv_##name##_init(uv_loop_t* loop, uv_##name##_t* handle) { \
40 uv__handle_init(loop, (uv_handle_t*) handle, UV_##NAME); \
47 uv_loop_t* loop = handle->loop; \
58 old_head = loop->name##_handles; \
67 loop->name##_handles = handle; \
77 uv_loop_t* loop = handle->loop; \
85 if (loop->name##_handles == handle) { \
86 loop->name##_handles = handle->name##_next; \
90 if (loop->next_##name##_handle == handle) { \
[all …]
H A Dhandle.c68 uv_loop_t* loop = handle->loop; in uv_close() local
80 uv__tcp_close(loop, (uv_tcp_t*)handle); in uv_close()
84 uv__pipe_close(loop, (uv_pipe_t*) handle); in uv_close()
92 uv__udp_close(loop, (uv_udp_t*) handle); in uv_close()
96 uv__poll_close(loop, (uv_poll_t*) handle); in uv_close()
102 uv__want_endgame(loop, handle); in uv_close()
108 uv__want_endgame(loop, handle); in uv_close()
114 uv__want_endgame(loop, handle); in uv_close()
120 uv__want_endgame(loop, handle); in uv_close()
124 uv__async_close(loop, (uv_async_t*) handle); in uv_close()
[all …]
/libuv/test/
H A Dtest-signal.c53 uv_loop_t* loop; in TEST_IMPL() local
55 loop = uv_default_loop(); in TEST_IMPL()
72 MAKE_VALGRIND_HAPPY(loop); in TEST_IMPL()
159 uv_loop_t* loop; in TEST_IMPL() local
161 loop = uv_default_loop(); in TEST_IMPL()
191 uv_loop_t* loop; in TEST_IMPL() local
194 loop = uv_default_loop(); in TEST_IMPL()
216 uv_loop_t* loop; in TEST_IMPL() local
218 loop = uv_default_loop(); in TEST_IMPL()
245 uv_loop_t* loop; in TEST_IMPL() local
[all …]
H A Dtest-threadpool-cancel.c68 uv_loop_t* loop; in saturate_threadpool() local
78 loop = uv_default_loop(); in saturate_threadpool()
204 uv_loop_t* loop; in TEST_IMPL() local
208 loop = uv_default_loop(); in TEST_IMPL()
237 uv_loop_t* loop; in TEST_IMPL() local
244 loop = uv_default_loop(); in TEST_IMPL()
271 uv_loop_t* loop; in TEST_IMPL() local
274 loop = uv_default_loop(); in TEST_IMPL()
295 uv_loop_t* loop; in TEST_IMPL() local
319 uv_loop_t* loop; in TEST_IMPL() local
[all …]
H A Dtest-loop-close.c29 uv_stop(handle->loop); in timer_cb()
35 uv_loop_t loop; in TEST_IMPL() local
37 loop.data = &loop; in TEST_IMPL()
38 ASSERT_OK(uv_loop_init(&loop)); in TEST_IMPL()
39 ASSERT_PTR_EQ(loop.data, (void*) &loop); in TEST_IMPL()
46 uv_run(&loop, UV_RUN_DEFAULT); in TEST_IMPL()
52 ASSERT_PTR_EQ(loop.data, (void*) &loop); in TEST_IMPL()
54 ASSERT_PTR_EQ(loop.data, (void*) &loop); in TEST_IMPL()
68 static uv_loop_t loop; in TEST_IMPL() local
70 ASSERT_OK(uv_loop_init(&loop)); in TEST_IMPL()
[all …]
H A Dtest-fs-event.c520 uv_loop_t* loop; in TEST_IMPL()
584 uv_loop_t* loop; in TEST_IMPL() local
682 uv_loop_t* loop; in TEST_IMPL() local
732 uv_loop_t* loop; in TEST_IMPL() local
754 uv_loop_t* loop; in TEST_IMPL() local
806 uv_loop_t* loop; in TEST_IMPL() local
925 uv_loop_t* loop; in TEST_IMPL() local
949 uv_loop_t* loop; in TEST_IMPL() local
983 uv_loop_t* loop; in TEST_IMPL() local
1025 uv_loop_t* loop; in TEST_IMPL() local
[all …]
H A Dtest-fs-poll.c47 static uv_loop_t* loop; variable
154 loop = uv_default_loop(); in TEST_IMPL()
167 MAKE_VALGRIND_HAPPY(loop); in TEST_IMPL()
175 loop = uv_default_loop(); in TEST_IMPL()
195 MAKE_VALGRIND_HAPPY(loop); in TEST_IMPL()
201 uv_loop_t loop; in TEST_IMPL() local
215 MAKE_VALGRIND_HAPPY(&loop); in TEST_IMPL()
220 uv_loop_t loop; in TEST_IMPL() local
239 MAKE_VALGRIND_HAPPY(&loop); in TEST_IMPL()
244 uv_loop_t loop; in TEST_IMPL() local
[all …]
H A Dtest-tcp-close-reset.c34 static uv_loop_t* loop; variable
210 loop = uv_default_loop(); in TEST_IMPL()
230 MAKE_VALGRIND_HAPPY(loop); in TEST_IMPL()
237 loop = uv_default_loop(); in TEST_IMPL()
257 MAKE_VALGRIND_HAPPY(loop); in TEST_IMPL()
264 loop = uv_default_loop(); in TEST_IMPL()
284 MAKE_VALGRIND_HAPPY(loop); in TEST_IMPL()
291 loop = uv_default_loop(); in TEST_IMPL()
311 MAKE_VALGRIND_HAPPY(loop); in TEST_IMPL()
318 loop = uv_default_loop(); in TEST_IMPL()
[all …]
H A Dtest-loop-time.c42 uv_loop_t *loop = uv_default_loop(); in TEST_IMPL() local
47 loop->active_handles++; in TEST_IMPL()
48 r = uv_run(loop, UV_RUN_NOWAIT); in TEST_IMPL()
50 loop->active_handles--; in TEST_IMPL()
51 ASSERT_OK(uv_loop_alive(loop)); in TEST_IMPL()
53 r = uv_timer_init(loop, &timer); in TEST_IMPL()
56 ASSERT_OK(uv_loop_alive(loop)); in TEST_IMPL()
57 ASSERT_OK(uv_backend_timeout(loop)); in TEST_IMPL()
63 r = uv_run(loop, UV_RUN_DEFAULT); in TEST_IMPL()
65 ASSERT_OK(uv_backend_timeout(loop)); in TEST_IMPL()
[all …]
H A Dtest-default-loop-close.c36 uv_loop_t* loop; in TEST_IMPL() local
39 loop = uv_default_loop(); in TEST_IMPL()
40 ASSERT_NOT_NULL(loop); in TEST_IMPL()
42 ASSERT_OK(uv_timer_init(loop, &timer_handle)); in TEST_IMPL()
44 ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); in TEST_IMPL()
46 ASSERT_OK(uv_loop_close(loop)); in TEST_IMPL()
48 loop = uv_default_loop(); in TEST_IMPL()
49 ASSERT_NOT_NULL(loop); in TEST_IMPL()
51 ASSERT_OK(uv_timer_init(loop, &timer_handle)); in TEST_IMPL()
53 ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); in TEST_IMPL()
[all …]
H A Dbenchmark-loop-count.c67 uv_loop_t* loop = uv_default_loop(); in BENCHMARK_IMPL() local
70 uv_idle_init(loop, &idle_handle); in BENCHMARK_IMPL()
74 uv_run(loop, UV_RUN_DEFAULT); in BENCHMARK_IMPL()
85 MAKE_VALGRIND_HAPPY(loop); in BENCHMARK_IMPL()
93 uv_idle_init(loop, &idle_handle); in BENCHMARK_IMPL()
96 uv_timer_init(loop, &timer_handle); in BENCHMARK_IMPL()
99 uv_run(loop, UV_RUN_DEFAULT); in BENCHMARK_IMPL()
104 MAKE_VALGRIND_HAPPY(loop); in BENCHMARK_IMPL()
116 uv_idle_init(loop, &idle_handle); in BENCHMARK_IMPL()
121 uv_run(loop, UV_RUN_DEFAULT); in BENCHMARK_IMPL()
[all …]
/libuv/src/
H A Dthreadpool.c271 w->loop = loop; in uv__work_submit()
310 uv_loop_t* loop; in uv__work_done() local
359 uv__req_unregister(req->loop); in uv__queue_done()
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()
[all …]
H A Duv-common.h145 void uv__loop_close(uv_loop_t* loop);
162 int uv__udp_init_ex(uv_loop_t* loop,
209 void uv__work_submit(uv_loop_t* loop,
225 int uv__next_timeout(const uv_loop_t* loop);
226 void uv__run_timers(uv_loop_t* loop);
234 ((loop)->active_reqs.count > 0)
250 ((loop)->active_handles > 0)
357 ((uv__loop_internal_fields_t*) loop->internal_fields)
360 (&uv__get_internal_fields(loop)->loop_metrics)
396 void uv__metrics_update_idle_time(uv_loop_t* loop);
[all …]

Completed in 47 milliseconds

123456789