Home
last modified time | relevance | path

Searched refs:i (Results 1 – 25 of 142) sorted by relevance

123456

/libuv/test/
H A Dtest-barrier.c39 unsigned i; in worker() local
44 for (i = 0; i < c->niter; i++) in worker()
96 unsigned i; in TEST_IMPL() local
104 for (i = 0; i < wc.niter; i++) in TEST_IMPL()
117 unsigned i; in serial_worker() local
120 for (i = 0; i < 5; i++) in serial_worker()
134 unsigned i; in TEST_IMPL() local
138 for (i = 0; i < ARRAY_SIZE(threads); ++i) in TEST_IMPL()
141 for (i = 0; i < 5; i++) in TEST_IMPL()
146 for (i = 0; i < ARRAY_SIZE(threads); ++i) in TEST_IMPL()
[all …]
H A Dbenchmark-pound.c44 int i; member
52 int i; member
60 int i; member
178 int i; in tcp_do_setup() local
180 for (i = 0; i < num; i++) { in tcp_do_setup()
181 tcp_conns[i].i = i; in tcp_do_setup()
187 int i; in pipe_do_setup() local
189 for (i = 0; i < num; i++) { in pipe_do_setup()
190 pipe_conns[i].i = i; in pipe_do_setup()
250 for (i = 0; i < num; i++) { in tcp_do_connect()
[all …]
H A Dtest-getaddrinfo.c64 int i; in getaddrinfo_cuncurrent_cb() local
67 for (i = 0; i < CONCURRENT_COUNT; i++) { in getaddrinfo_cuncurrent_cb()
69 ASSERT_EQ(i, *data); in getaddrinfo_cuncurrent_cb()
71 callback_counts[i]++; in getaddrinfo_cuncurrent_cb()
75 ASSERT (i < CONCURRENT_COUNT); in getaddrinfo_cuncurrent_cb()
187 int i, r; in TEST_IMPL() local
190 for (i = 0; i < CONCURRENT_COUNT; i++) { in TEST_IMPL()
191 callback_counts[i] = 0; in TEST_IMPL()
195 *data = i; in TEST_IMPL()
209 for (i = 0; i < CONCURRENT_COUNT; i++) { in TEST_IMPL()
[all …]
H A Dbenchmark-fs-stat.c48 unsigned int i; in warmup() local
51 for (i = 0; i < ARRAY_SIZE(reqs); i++) in warmup()
52 uv_fs_stat(uv_default_loop(), reqs + i, path, uv_fs_req_cleanup); in warmup()
57 for (i = 0; i < 16; i++) in warmup()
67 int i; in sync_bench() local
72 for (i = 0; i < NUM_SYNC_REQS; i++) in sync_bench()
101 int i; in async_bench() local
103 for (i = 1; i <= MAX_CONCURRENT_REQS; i++) { in async_bench()
106 for (req = reqs; req < reqs + i; req++) { in async_bench()
118 i, in async_bench()
H A Dtest-platform-output.c43 int i; in TEST_IMPL() local
139 for (i = 0; i < count; i++) { in TEST_IMPL()
140 printf(" model: %s\n", cpus[i].model); in TEST_IMPL()
141 printf(" speed: %d\n", cpus[i].speed); in TEST_IMPL()
158 for (i = 0; i < count; i++) { in TEST_IMPL()
159 printf(" name: %s\n", interfaces[i].name); in TEST_IMPL()
163 (unsigned char)interfaces[i].phys_addr[0], in TEST_IMPL()
164 (unsigned char)interfaces[i].phys_addr[1], in TEST_IMPL()
165 (unsigned char)interfaces[i].phys_addr[2], in TEST_IMPL()
166 (unsigned char)interfaces[i].phys_addr[3], in TEST_IMPL()
[all …]
H A Dtest-poll-close.c47 int i; in TEST_IMPL() local
57 for (i = 0; i < NUM_SOCKETS; i++) { in TEST_IMPL()
58 sockets[i] = socket(AF_INET, SOCK_STREAM, 0); in TEST_IMPL()
59 uv_poll_init_socket(uv_default_loop(), &poll_handles[i], sockets[i]); in TEST_IMPL()
60 uv_poll_start(&poll_handles[i], UV_READABLE | UV_WRITABLE, NULL); in TEST_IMPL()
63 for (i = 0; i < NUM_SOCKETS; i++) { in TEST_IMPL()
64 uv_close((uv_handle_t*) &poll_handles[i], close_cb); in TEST_IMPL()
H A Dtest-tcp-close-accept.c55 unsigned int i; in connect_cb() local
74 i = req - connect_reqs; in connect_cb()
89 unsigned int i; in read_cb() local
100 for (i = 0; i < got_connections; i++) { in read_cb()
101 if (i != pending_incoming) in read_cb()
118 unsigned int i; in connection_cb() local
136 for (i = 0; i < ARRAY_SIZE(tcp_incoming); i++) { in connection_cb()
137 incoming = &tcp_incoming[i]; in connection_cb()
143 unsigned int i; in TEST_IMPL() local
173 for (i = 0; i < ARRAY_SIZE(tcp_outgoing); i++) { in TEST_IMPL()
[all …]
H A Dtest-process-title-threadsafe.c70 int i; in setter_thread_body() local
72 for (i = 0; i < NUM_ITERATIONS; i++) { in setter_thread_body()
85 int i; in TEST_IMPL() local
97 for (i = 0; i < (int) ARRAY_SIZE(setter_threads); i++) in TEST_IMPL()
98 ASSERT_OK(uv_thread_create(&setter_threads[i], setter_thread_body, NULL)); in TEST_IMPL()
100 for (i = 0; i < (int) ARRAY_SIZE(setter_threads); i++) in TEST_IMPL()
101 ASSERT_OK(uv_thread_join(&setter_threads[i])); in TEST_IMPL()
H A Dtest-osx-select.c52 size_t i; in TEST_IMPL() local
73 for (i = 0, len = strlen(str); i < len; i++) { in TEST_IMPL()
74 r = ioctl(fd, TIOCSTI, str + i); in TEST_IMPL()
90 size_t i; in TEST_IMPL() local
102 for (i = 0; i < ARRAY_SIZE(tcps); i++) { in TEST_IMPL()
103 r = uv_tcp_init(uv_default_loop(), &tcps[i]); in TEST_IMPL()
105 r = uv_tcp_bind(&tcps[i], (const struct sockaddr *) &addr, 0); in TEST_IMPL()
107 uv_unref((uv_handle_t*) &tcps[i]); in TEST_IMPL()
127 for (i = 0, len = strlen(str); i < len; i++) { in TEST_IMPL()
128 r = ioctl(fd, TIOCSTI, str + i); in TEST_IMPL()
H A Dtest-process-priority.c29 int i; in TEST_IMPL() local
41 for (i = UV_PRIORITY_HIGHEST; i <= UV_PRIORITY_LOW; i++) { in TEST_IMPL()
42 r = uv_os_setpriority(0, i); in TEST_IMPL()
55 ASSERT_EQ(priority, i); in TEST_IMPL()
59 if (i < UV_PRIORITY_HIGH) in TEST_IMPL()
61 else if (i < UV_PRIORITY_ABOVE_NORMAL) in TEST_IMPL()
63 else if (i < UV_PRIORITY_NORMAL) in TEST_IMPL()
65 else if (i < UV_PRIORITY_BELOW_NORMAL) in TEST_IMPL()
67 else if (i < UV_PRIORITY_LOW) in TEST_IMPL()
H A Dtest-signal-multiple-loops.c228 int i; in TEST_IMPL() local
238 for (i = 0; i < NUM_LOOP_CREATING_THREADS; i++) { in TEST_IMPL()
239 r = uv_thread_create(&loop_creating_threads[i], in TEST_IMPL()
246 for (i = 0; i < NUM_SIGNAL_HANDLING_THREADS; i++) { in TEST_IMPL()
247 switch (i % 3) { in TEST_IMPL()
260 for (i = 0; i < NUM_SIGNAL_HANDLING_THREADS; i++) in TEST_IMPL()
269 for (i = 0; i < NUM_SIGNAL_HANDLING_THREADS; i++) in TEST_IMPL()
285 for (i = 0; i < NUM_SIGNAL_HANDLING_THREADS; i++) { in TEST_IMPL()
286 r = uv_thread_join(&signal_handling_threads[i]); in TEST_IMPL()
296 for (i = 0; i < NUM_LOOP_CREATING_THREADS; i++) { in TEST_IMPL()
[all …]
H A Dtest-pipe-connect-multiple.c76 int i; in TEST_IMPL() local
91 for (i = 0; i < NUM_CLIENTS; i++) { in TEST_IMPL()
92 r = uv_pipe_init(loop, &clients[i].pipe_handle, 0); in TEST_IMPL()
94 uv_pipe_connect(&clients[i].conn_req, in TEST_IMPL()
95 &clients[i].pipe_handle, in TEST_IMPL()
142 int i; in TEST_IMPL() local
157 for (i = 0; i < NUM_CLIENTS; i++) { in TEST_IMPL()
158 r = uv_pipe_init(loop, &clients[i].pipe_handle, 0); in TEST_IMPL()
160 uv_pipe_connect(&clients[i].conn_req, in TEST_IMPL()
161 &clients[i].pipe_handle, in TEST_IMPL()
[all …]
H A Dtest-watcher-cross-stop.c72 unsigned int i; in TEST_IMPL() local
83 for (i = 0; i < ARRAY_SIZE(sockets); i++) { in TEST_IMPL()
84 ASSERT_OK(uv_udp_init(loop, &sockets[i])); in TEST_IMPL()
85 ASSERT_OK(uv_udp_bind(&sockets[i], in TEST_IMPL()
88 ASSERT_OK(uv_udp_recv_start(&sockets[i], alloc_cb, recv_cb)); in TEST_IMPL()
89 ASSERT_OK(uv_udp_send(&reqs[i], in TEST_IMPL()
90 &sockets[i], in TEST_IMPL()
100 for (i = 0; i < ARRAY_SIZE(sockets); i++) in TEST_IMPL()
101 uv_close((uv_handle_t*) &sockets[i], close_cb); in TEST_IMPL()
H A Dbenchmark-udp-pummel.c136 int i; in timeout_cb() local
140 for (i = 0; i < n_senders_; i++) in timeout_cb()
141 uv_close((uv_handle_t*)&senders[i].udp_handle, close_cb); in timeout_cb()
143 for (i = 0; i < n_receivers_; i++) in timeout_cb()
154 unsigned int i; in pummel() local
172 for (i = 0; i < n_receivers; i++) { in pummel()
173 struct receiver_state* s = receivers + i; in pummel()
175 ASSERT_OK(uv_ip4_addr("0.0.0.0", BASE_PORT + i, &addr)); in pummel()
188 for (i = 0; i < n_senders; i++) { in pummel()
189 struct sender_state* s = senders + i; in pummel()
[all …]
H A Dtest-ipc-heavy-traffic-deadlock-bug.c65 size_t i; in do_write() local
71 for (i = 0; i < BUFFERS_PER_WRITE; i++) { in do_write()
72 memset(&write_info->buffers[i], BUFFER_CONTENT, BUFFER_SIZE); in do_write()
73 bufs[i] = uv_buf_init(write_info->buffers[i], BUFFER_SIZE); in do_write()
94 ssize_t i; in read_cb() local
100 for (i = 0; i < nread; i++) in read_cb()
101 ASSERT_EQ(buf->base[i], BUFFER_CONTENT); in read_cb()
113 size_t i; in do_writes_and_reads() local
119 for (i = 0; i < NUM_WRITES; i++) { in do_writes_and_reads()
H A Dbenchmark-million-async.c44 unsigned i; in thread_cb() local
47 i = fastrand() % ARRAY_SIZE(container->async_handles); in thread_cb()
48 uv_async_send(container->async_handles + i); in thread_cb()
60 unsigned i; in timer_cb() local
65 for (i = 0; i < ARRAY_SIZE(container->async_handles); i++) { in timer_cb()
66 uv_async_t* handle = container->async_handles + i; in timer_cb()
84 unsigned i; in BENCHMARK_IMPL() local
94 for (i = 0; i < ARRAY_SIZE(container->async_handles); i++) { in BENCHMARK_IMPL()
95 handle = container->async_handles + i; in BENCHMARK_IMPL()
H A Drunner.c157 int i; in run_test() local
278 for (i = 0; i < process_count - 1; i++) { in run_test()
279 process_terminate(&processes[i]); in run_test()
296 for (i = 0; i < process_count; i++) { in run_test()
300 process_get_name(&processes[i])); in run_test()
332 for (i = 0; i < process_count; i++) { in run_test()
340 for (i = 0; i < process_count; i++) { in run_test()
341 process_cleanup(&processes[i]); in run_test()
391 int i; in print_tests() local
404 for (i = 0; i < n_helpers; i++) { in print_tests()
[all …]
H A Dbenchmark-million-timers.c49 int i; in BENCHMARK_IMPL() local
58 for (i = 0; i < NUM_TIMERS; i++) { in BENCHMARK_IMPL()
59 if (i % 1000 == 0) timeout++; in BENCHMARK_IMPL()
60 ASSERT_OK(uv_timer_init(loop, timers + i)); in BENCHMARK_IMPL()
61 ASSERT_OK(uv_timer_start(timers + i, timer_cb, timeout, 0)); in BENCHMARK_IMPL()
68 for (i = 0; i < NUM_TIMERS; i++) in BENCHMARK_IMPL()
69 uv_close((uv_handle_t*) (timers + i), close_cb); in BENCHMARK_IMPL()
/libuv/docs/code/queue-cancel/
H A Dmain.c36 int i; in signal_handler() local
37 for (i = 0; i < FIB_UNTIL; i++) { in signal_handler()
38 uv_cancel((uv_req_t*) &fib_reqs[i]); in signal_handler()
47 int i; in main() local
48 for (i = 0; i < FIB_UNTIL; i++) { in main()
49 data[i] = i; in main()
50 fib_reqs[i].data = (void *) &data[i]; in main()
51 uv_queue_work(loop, &fib_reqs[i], fib, after_fib); in main()
/libuv/src/win/
H A Dprocess-stdio.c173 int count, i; in uv__stdio_create() local
195 for (i = 0; i < count; i++) { in uv__stdio_create()
196 CHILD_STDIO_CRT_FLAGS(buffer, i) = 0; in uv__stdio_create()
200 for (i = 0; i < count; i++) { in uv__stdio_create()
202 if (i < options->stdio_count) { in uv__stdio_create()
203 fdopt = options->stdio[i]; in uv__stdio_create()
217 if (i <= 2) { in uv__stdio_create()
359 int i, count; in uv__stdio_destroy() local
362 for (i = 0; i < count; i++) { in uv__stdio_destroy()
374 int i, count; in uv__stdio_noinherit() local
[all …]
H A Dfs-fd-hash-inl.h77 size_t i; in uv__fd_hash_init() local
85 for (i = 0; i < ARRAY_SIZE(uv__fd_hash); ++i) { in uv__fd_hash_init()
86 uv__fd_hash[i].size = 0; in uv__fd_hash_init()
87 uv__fd_hash[i].data = in uv__fd_hash_init()
101 for (i = 0; i < group_size; ++i) { \
145 i = bucket_ptr->size % UV__FD_HASH_GROUP_SIZE; in uv__fd_hash_add()
147 if (bucket_ptr->size != 0 && i == 0) { in uv__fd_hash_add()
158 entry_ptr = &bucket_ptr->data->entries[i]; in uv__fd_hash_add()
179 i = bucket_ptr->size % UV__FD_HASH_GROUP_SIZE; in uv__fd_hash_remove()
180 if (entry_ptr != &bucket_ptr->data->entries[i]) { in uv__fd_hash_remove()
[all …]
/libuv/src/
H A Dstrscpy.c26 size_t i; in uv__strscpy() local
28 for (i = 0; i < n; i++) in uv__strscpy()
29 if ('\0' == (d[i] = s[i])) in uv__strscpy()
30 return i > SSIZE_MAX ? UV_E2BIG : (ssize_t) i; in uv__strscpy()
32 if (i == 0) in uv__strscpy()
35 d[--i] = '\0'; in uv__strscpy()
H A Dinet.c73 int i; in inet_ntop6() local
81 for (i = 0; i < (int) sizeof(struct in6_addr); i++) in inet_ntop6()
82 words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3)); in inet_ntop6()
87 for (i = 0; i < (int) ARRAY_SIZE(words); i++) { in inet_ntop6()
88 if (words[i] == 0) { in inet_ntop6()
112 for (i = 0; i < (int) ARRAY_SIZE(words); i++) { in inet_ntop6()
116 if (i == best.base) in inet_ntop6()
121 if (i != 0) in inet_ntop6()
284 int i; in inet_pton6() local
288 for (i = 1; i <= n; i++) { in inet_pton6()
[all …]
/libuv/src/unix/
H A Dposix-poll.c56 size_t i; in uv__pollfds_maybe_resize() local
69 for (i = loop->poll_fds_size; i < n; i++) { in uv__pollfds_maybe_resize()
87 size_t i; in uv__pollfds_add() local
92 for (i = 0; i < loop->poll_fds_used; ++i) { in uv__pollfds_add()
108 size_t i; in uv__pollfds_del() local
110 for (i = 0; i < loop->poll_fds_used;) { in uv__pollfds_del()
128 ++i; in uv__pollfds_del()
142 size_t i; in uv__io_poll() local
267 for (i = 0; i < loop->poll_fds_used; i++) { in uv__io_poll()
348 size_t i; in uv__platform_invalidate_fd() local
[all …]
H A Dos390-proctitle.c43 int i; in uv_setup_args() local
50 for (i = 0; i < argc; i++) in uv_setup_args()
51 size += strlen(argv[i]) + 1; in uv_setup_args()
62 for (i = 0; i < argc; i++) { in uv_setup_args()
63 size = strlen(argv[i]) + 1; in uv_setup_args()
64 memcpy(s, argv[i], size); in uv_setup_args()
65 new_argv[i] = s; in uv_setup_args()
68 new_argv[i] = NULL; in uv_setup_args()

Completed in 42 milliseconds

123456