Home
last modified time | relevance | path

Searched refs:ARRAY_SIZE (Results 1 – 25 of 59) sorted by relevance

123

/libuv/test/
H A Dtest-tcp-close-accept.c34 static uv_tcp_t tcp_incoming[ARRAY_SIZE(tcp_outgoing)];
35 static uv_connect_t connect_reqs[ARRAY_SIZE(tcp_outgoing)];
38 static uv_write_t write_reqs[ARRAY_SIZE(tcp_outgoing)];
73 ASSERT_LE(req, connect_reqs + ARRAY_SIZE(connect_reqs)); in connect_cb()
124 if (got_connections == ARRAY_SIZE(tcp_incoming)) in connection_cb()
132 if (got_connections != ARRAY_SIZE(tcp_incoming)) in connection_cb()
136 for (i = 0; i < ARRAY_SIZE(tcp_incoming); i++) { in connection_cb()
170 ARRAY_SIZE(tcp_outgoing), in TEST_IMPL()
173 for (i = 0; i < ARRAY_SIZE(tcp_outgoing); i++) { in TEST_IMPL()
185 ASSERT_EQ(ARRAY_SIZE(tcp_outgoing), got_connections); in TEST_IMPL()
[all …]
H A Dtest-pipe-sendmsg.c88 ASSERT_LT(incoming_count, ARRAY_SIZE(incoming)); in read_cb()
94 if (incoming_count != ARRAY_SIZE(incoming)) in read_cb()
99 for (i = 0; i < ARRAY_SIZE(incoming); i++) in read_cb()
111 int send_fds[ARRAY_SIZE(incoming)]; in TEST_IMPL()
119 for (i = 0; i < ARRAY_SIZE(send_fds); i += 2) in TEST_IMPL()
121 ASSERT_EQ(i, ARRAY_SIZE(send_fds)); in TEST_IMPL()
144 for (i = 0; i < ARRAY_SIZE(send_fds); i++) in TEST_IMPL()
157 ASSERT_EQ(ARRAY_SIZE(incoming), incoming_count); in TEST_IMPL()
158 ASSERT_EQ(ARRAY_SIZE(incoming) + 1, close_called); in TEST_IMPL()
H A Dtest-watcher-cross-stop.c36 static uv_udp_send_t reqs[ARRAY_SIZE(sockets)];
77 TEST_FILE_LIMIT(ARRAY_SIZE(sockets) + 32); in TEST_IMPL()
83 for (i = 0; i < ARRAY_SIZE(sockets); i++) { in TEST_IMPL()
100 for (i = 0; i < ARRAY_SIZE(sockets); i++) in TEST_IMPL()
107 ASSERT_EQ(ARRAY_SIZE(sockets), send_cb_called); in TEST_IMPL()
108 ASSERT_EQ(ARRAY_SIZE(sockets), close_cb_called); in TEST_IMPL()
H A Dtest-tty-duplicate-key.c178 WriteConsoleInputW(handle, records, ARRAY_SIZE(records), &written); in TEST_IMPL()
179 ASSERT_EQ(written, ARRAY_SIZE(records)); in TEST_IMPL()
232 WriteConsoleInputW(handle, records, ARRAY_SIZE(records), &written); in TEST_IMPL()
242 WriteConsoleInputW(handle, records, ARRAY_SIZE(records), &written); in TEST_IMPL()
298 WriteConsoleInputW(handle, records, ARRAY_SIZE(records), &written); in TEST_IMPL()
299 ASSERT_EQ(written, ARRAY_SIZE(records)); in TEST_IMPL()
301 WriteConsoleInputW(handle, records, ARRAY_SIZE(records), &written); in TEST_IMPL()
302 ASSERT_EQ(written, ARRAY_SIZE(records)); in TEST_IMPL()
304 WriteConsoleInputW(handle, records, ARRAY_SIZE(records), &written); in TEST_IMPL()
305 ASSERT_EQ(written, ARRAY_SIZE(records)); in TEST_IMPL()
[all …]
H A Dbenchmark-million-async.c47 i = fastrand() % ARRAY_SIZE(container->async_handles); in thread_cb()
65 for (i = 0; i < ARRAY_SIZE(container->async_handles); i++) { in timer_cb()
94 for (i = 0; i < ARRAY_SIZE(container->async_handles); i++) { in BENCHMARK_IMPL()
H A Dtest-threadpool-cancel.c32 (ci)->nreqs = ARRAY_SIZE(what); \
54 static uv_sem_t pause_sems[ARRAY_SIZE(pause_reqs)];
75 (unsigned long)ARRAY_SIZE(pause_reqs)); in saturate_threadpool()
79 for (i = 0; i < ARRAY_SIZE(pause_reqs); i += 1) { in saturate_threadpool()
89 for (i = 0; i < ARRAY_SIZE(pause_reqs); i += 1) in unblock_threadpool()
302 for (i = 0; i < ARRAY_SIZE(reqs); i++) in TEST_IMPL()
309 ASSERT_EQ(ARRAY_SIZE(reqs), done2_cb_called); in TEST_IMPL()
356 ASSERT_EQ(n, ARRAY_SIZE(reqs)); in TEST_IMPL()
H A Dbenchmark-udp-pummel.c102 ARRAY_SIZE(bufs), in send_cb()
156 ASSERT_LE(n_senders, ARRAY_SIZE(senders)); in pummel()
157 ASSERT_LE(n_receivers, ARRAY_SIZE(receivers)); in pummel()
197 ARRAY_SIZE(bufs), in pummel()
H A Dtest-strtok.c68 size_t tokens_len = ARRAY_SIZE(tokens); in TEST_IMPL()
69 size_t tests_len = ARRAY_SIZE(tests); in TEST_IMPL()
H A Dtest-barrier.c136 ASSERT_OK(uv_barrier_init(&barrier, ARRAY_SIZE(threads) + 1)); in TEST_IMPL()
138 for (i = 0; i < ARRAY_SIZE(threads); ++i) in TEST_IMPL()
146 for (i = 0; i < ARRAY_SIZE(threads); ++i) in TEST_IMPL()
H A Dtest-process-title-threadsafe.c97 for (i = 0; i < (int) ARRAY_SIZE(setter_threads); i++) in TEST_IMPL()
100 for (i = 0; i < (int) ARRAY_SIZE(setter_threads); i++) in TEST_IMPL()
H A Dtest-poll-close-doesnt-corrupt-stack.c58 for (i = 0; i < ARRAY_SIZE(data); i++) in close_socket_and_verify_stack()
66 for (i = 0; i < ARRAY_SIZE(data); i++) in close_socket_and_verify_stack()
H A Dtest-stdio-over-pipes.c218 uv_write_t write_req[ARRAY_SIZE(buffers)]; in stdio_over_pipes_helper()
219 uv_buf_t buf[ARRAY_SIZE(buffers)]; in stdio_over_pipes_helper()
249 for (i = 0; i < ARRAY_SIZE(buffers); i++) { in stdio_over_pipes_helper()
253 for (i = 0; i < ARRAY_SIZE(buffers); i++) { in stdio_over_pipes_helper()
H A Dtest-thread.c120 for (i = 0; i < ARRAY_SIZE(getaddrinfo_reqs); i++) { in do_work()
127 for (i = 0; i < ARRAY_SIZE(fs_reqs); i++) { in do_work()
177 for (i = 0; i < ARRAY_SIZE(threads); i++) { in TEST_IMPL()
182 for (i = 0; i < ARRAY_SIZE(threads); i++) { in TEST_IMPL()
H A Dtest-fs-readdir.c84 dir->nentries = ARRAY_SIZE(dirents); in empty_opendir_cb()
129 dir->nentries = ARRAY_SIZE(dirents); in TEST_IMPL()
315 dir->nentries = ARRAY_SIZE(dirents); in non_empty_readdir_cb()
334 dir->nentries = ARRAY_SIZE(dirents); in non_empty_opendir_cb()
409 dir->nentries = ARRAY_SIZE(dirents); in TEST_IMPL()
500 dir->nentries = ARRAY_SIZE(symlink_dirents); in readdir_symlink_opendir_cb()
H A Dtest-osx-select.c97 TEST_FILE_LIMIT(ARRAY_SIZE(tcps) + 100); in TEST_IMPL()
102 for (i = 0; i < ARRAY_SIZE(tcps); i++) { in TEST_IMPL()
H A Dtest-queue-foreach-delete.c105 for (i = 0; i < ARRAY_SIZE(name); i++) { \
140 for (i = 0; i < ARRAY_SIZE(fs_event); i++) { in init_and_start_fs_events()
/libuv/src/unix/
H A Dopenbsd.c53 if (sysctl(which, ARRAY_SIZE(which), &info, &size, NULL, 0) < 0) return; in uv_loadavg()
82 if (sysctl(mib, ARRAY_SIZE(mib), argsbuf, &argsbuf_size, NULL, 0) == 0) { in uv_exepath()
118 if (sysctl(which, ARRAY_SIZE(which), &info, &size, NULL, 0)) in uv_get_free_memory()
130 if (sysctl(which, ARRAY_SIZE(which), &info, &size, NULL, 0)) in uv_get_total_memory()
160 if (sysctl(mib, ARRAY_SIZE(mib), &kinfo, &size, NULL, 0) < 0) in uv_resident_set_memory()
174 if (sysctl(which, ARRAY_SIZE(which), &info, &size, NULL, 0)) in uv_uptime()
197 if (sysctl(which, ARRAY_SIZE(which), &model, &size, NULL, 0)) in uv_cpu_info()
202 if (sysctl(which, ARRAY_SIZE(which), &numcpus, &size, NULL, 0)) in uv_cpu_info()
214 if (sysctl(which, ARRAY_SIZE(which), &cpuspeed, &size, NULL, 0)) in uv_cpu_info()
220 if (sysctl(percpu, ARRAY_SIZE(percpu), &info, &size, NULL, 0)) in uv_cpu_info()
H A Dnetbsd.c58 if (sysctl(which, ARRAY_SIZE(which), &info, &size, NULL, 0) == -1) return; in uv_loadavg()
82 int_size = ARRAY_SIZE(int_buf); in uv_exepath()
105 if (sysctl(which, ARRAY_SIZE(which), &info, &size, NULL, 0)) in uv_get_free_memory()
122 if (sysctl(which, ARRAY_SIZE(which), &info, &size, NULL, 0)) in uv_get_total_memory()
175 if (sysctl(which, ARRAY_SIZE(which), &info, &size, NULL, 0)) in uv_uptime()
253 if (sysctl(name, ARRAY_SIZE(name), p, &count, NULL, 0) == -1) in uv__random_sysctl()
H A Dfreebsd.c78 if (sysctl(mib, ARRAY_SIZE(mib), abspath, &abspath_size, NULL, 0)) in uv_exepath()
112 if (sysctl(which, ARRAY_SIZE(which), &info, &size, NULL, 0)) in uv_get_total_memory()
134 if (sysctl(which, ARRAY_SIZE(which), &info, &size, NULL, 0) < 0) return; in uv_loadavg()
155 if (sysctl(mib, ARRAY_SIZE(mib), &kinfo, &kinfo_size, NULL, 0)) in uv_resident_set_memory()
H A Ddarwin.c116 if (sysctl(which, ARRAY_SIZE(which), &info, &size, NULL, 0)) in uv_get_total_memory()
138 if (sysctl(which, ARRAY_SIZE(which), &info, &size, NULL, 0) < 0) return; in uv_loadavg()
173 if (sysctl(which, ARRAY_SIZE(which), &info, &size, NULL, 0)) in uv_uptime()
H A Dkqueue.c216 if (++nevents == ARRAY_SIZE(events)) { in uv__io_poll()
226 if (++nevents == ARRAY_SIZE(events)) { in uv__io_poll()
236 if (++nevents == ARRAY_SIZE(events)) { in uv__io_poll()
290 ARRAY_SIZE(events), in uv__io_poll()
453 if (nfds == ARRAY_SIZE(events) && --count != 0) { in uv__io_poll()
/libuv/src/win/
H A Dgetnameinfo.c52 ARRAY_SIZE(host), in uv__getnameinfo_work()
54 ARRAY_SIZE(service), in uv__getnameinfo_work()
H A Dfs-fd-hash-inl.h85 for (i = 0; i < ARRAY_SIZE(uv__fd_hash); ++i) { in uv__fd_hash_init()
94 unsigned bucket = fd % ARRAY_SIZE(uv__fd_hash); \
/libuv/src/
H A Dinet.c87 for (i = 0; i < (int) ARRAY_SIZE(words); i++) { in inet_ntop6()
112 for (i = 0; i < (int) ARRAY_SIZE(words); i++) { in inet_ntop6()
136 if (best.base != -1 && (best.base + best.len) == ARRAY_SIZE(words)) in inet_ntop6()
H A Dthreadpool.c199 nthreads = ARRAY_SIZE(default_threads); in init_threads()
209 if (nthreads > ARRAY_SIZE(default_threads)) { in init_threads()
212 nthreads = ARRAY_SIZE(default_threads); in init_threads()

Completed in 29 milliseconds

123