Home
last modified time | relevance | path

Searched refs:nfds (Results 1 – 25 of 92) sorted by relevance

1234

/third_party/ltp/testcases/kernel/syscalls/dup/
Ddup03.c125 int nfds = 0; variable
186 for (nfds = 1; nfds <= maxfds; nfds++) in setup()
187 if ((fd[nfds - 1] = in setup()
193 nfds--; in setup()
196 if (nfds == 0) in setup()
198 if (nfds > maxfds) in setup()
208 for (i = 0; i <= nfds; i++) in cleanup()
/third_party/cares/
Dares_fds.c26 ares_socket_t nfds; in ares_fds() local
32 nfds = 0; in ares_fds()
42 if (server->udp_socket >= nfds) in ares_fds()
43 nfds = server->udp_socket + 1; in ares_fds()
54 if (server->tcp_socket >= nfds) in ares_fds()
55 nfds = server->tcp_socket + 1; in ares_fds()
58 return (int)nfds; in ares_fds()
Dacountry.c200 int nfds; in wait_ares() local
204 nfds = ares_fds(channel, &read_fds, &write_fds); in wait_ares()
205 if (nfds == 0) in wait_ares()
208 nfds = select(nfds, &read_fds, &write_fds, NULL, tvp); in wait_ares()
209 if (nfds < 0) in wait_ares()
Dahost.c58 int status, nfds, c, addr_family = AF_INET; in main() local
149 nfds = ares_fds(channel, &read_fds, &write_fds); in main()
150 if (nfds == 0) in main()
153 res = select(nfds, &read_fds, &write_fds, NULL, tvp); in main()
/third_party/node/deps/cares/src/lib/
Dares_fds.c26 ares_socket_t nfds; in ares_fds() local
32 nfds = 0; in ares_fds()
42 if (server->udp_socket >= nfds) in ares_fds()
43 nfds = server->udp_socket + 1; in ares_fds()
54 if (server->tcp_socket >= nfds) in ares_fds()
55 nfds = server->tcp_socket + 1; in ares_fds()
58 return (int)nfds; in ares_fds()
/third_party/libuv/src/unix/
Depoll.c53 uintptr_t nfds; in uv__platform_invalidate_fd() local
59 nfds = (uintptr_t) loop->watchers[loop->nwatchers + 1]; in uv__platform_invalidate_fd()
62 for (i = 0; i < nfds; i++) in uv__platform_invalidate_fd()
129 int nfds; in uv__io_poll() local
136 if (loop->nfds == 0) { in uv__io_poll()
226 nfds = epoll_pwait(loop->backend_fd, in uv__io_poll()
231 if (nfds == -1 && errno == ENOSYS) { in uv__io_poll()
236 nfds = epoll_wait(loop->backend_fd, in uv__io_poll()
240 if (nfds == -1 && errno == ENOSYS) { in uv__io_poll()
256 if (nfds == 0) { in uv__io_poll()
[all …]
Dkqueue.c129 int nfds; in uv__io_poll() local
136 if (loop->nfds == 0) { in uv__io_poll()
231 nfds = kevent(loop->backend_fd, in uv__io_poll()
247 if (nfds == 0) { in uv__io_poll()
261 if (nfds == -1) { in uv__io_poll()
285 loop->watchers[loop->nwatchers + 1] = (void*) (uintptr_t) nfds; in uv__io_poll()
286 for (i = 0; i < nfds; i++) { in uv__io_poll()
418 if (nfds == ARRAY_SIZE(events) && --count != 0) { in uv__io_poll()
447 uintptr_t nfds; in uv__platform_invalidate_fd() local
453 nfds = (uintptr_t) loop->watchers[loop->nwatchers + 1]; in uv__platform_invalidate_fd()
[all …]
Dos390.c492 uintptr_t nfds; in uv__platform_invalidate_fd() local
498 nfds = (uintptr_t) loop->watchers[loop->nwatchers + 1]; in uv__platform_invalidate_fd()
501 for (i = 0; i < nfds; i++) in uv__platform_invalidate_fd()
658 int nfds; in uv__io_poll() local
665 if (loop->nfds == 0) { in uv__io_poll()
724 nfds = 0; in uv__io_poll()
735 nfds = epoll_wait(loop->ep, events, in uv__io_poll()
744 if (nfds == 0) { in uv__io_poll()
764 if (nfds == -1) { in uv__io_poll()
787 loop->watchers[loop->nwatchers + 1] = (void*) (uintptr_t) nfds; in uv__io_poll()
[all …]
/third_party/ltp/testcases/kernel/syscalls/select/
Dselect_var.h18 static int do_select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval… in do_select() argument
22 return select(nfds, readfds, writefds, exceptfds, timeout); in do_select()
26 return tst_syscall(__NR_select, nfds, readfds, writefds, exceptfds, timeout); in do_select()
29 ._n = (long)nfds, in do_select()
45 ret = tst_syscall(__NR_pselect6, nfds, readfds, writefds, exceptfds, &ts, NULL); in do_select()
52 return tst_syscall(__NR__newselect, nfds, readfds, writefds, exceptfds, timeout); in do_select()
/third_party/ltp/testcases/kernel/syscalls/ppoll/
Dppoll01.c38 unsigned int nfds; /* nfds ppoll parameter */ member
91 .nfds = 1,
99 .nfds = 0,
110 .nfds = 0,
119 .nfds = 1,
127 .nfds = 0,
137 .nfds = 0,
149 .nfds = -1,
157 .nfds = 1,
226 sys_ret = tst_syscall(__NR_ppoll, tc->fds, tc->nfds, tsp, in do_test()
/third_party/glib/glib/
Dgpoll.c122 guint nfds, in g_poll() argument
125 return poll ((struct pollfd *)fds, nfds, timeout); in g_poll()
297 guint nfds, in fill_poll_thread_data() argument
318 for (f = fds; f < &fds[nfds]; ++f) in fill_poll_thread_data()
365 guint nfds, in g_poll() argument
383 if (nfds <= MAXIMUM_WAIT_OBJECTS) in g_poll()
390 fill_poll_thread_data (fds, nfds, timeout, NULL, &data); in g_poll()
397 for (f = fds; f < &fds[nfds]; ++f) in g_poll()
406 nthreads = nfds / MAXIMUM_WAIT_OBJECTS_PER_THREAD; in g_poll()
407 threads_remain = nfds % MAXIMUM_WAIT_OBJECTS_PER_THREAD; in g_poll()
[all …]
/third_party/NuttX/fs/vfs/
Dfs_select.c111 int do_select(int nfds, fd_set *readfds, fd_set *writefds, in do_select() argument
123 if (nfds < 0 || nfds >= FD_SETSIZE) in do_select()
133 for (fd = 0, npfds = 0; fd < nfds; fd++) in do_select()
201 for (fd = 0, ndx = 0; fd < nfds; fd++) in do_select()
332 int select(int nfds, fd_set *readfds, fd_set *writefds, in select() argument
335 return do_select(nfds, readfds, writefds, exceptfds, timeout, poll); in select()
/third_party/pulseaudio/src/pulsecore/
Dpoll.h59 #define pa_poll(fds,nfds,timeout) poll((fds),(nfds),(timeout)) argument
61 int pa_poll(struct pollfd *fds, unsigned long nfds, int timeout);
Dpoll-posix.c59 int pa_poll (struct pollfd *fds, unsigned long int nfds, int timeout) { in pa_poll() argument
73 if (nfds == 0) { in pa_poll()
91 for (f = fds; f < &fds[nfds]; ++f) { in pa_poll()
123 for (f = fds; f < &fds[nfds]; ++f) { in pa_poll()
161 for (f = fds; f < &fds[nfds]; f++) in pa_poll()
192 for (f = fds; f < &fds[nfds]; ++f) { in pa_poll()
/third_party/uboot/u-boot-2020.01/tools/
Dkwboot.c158 int rc, nfds; in kwboot_tty_recv() local
176 nfds = select(fd + 1, &rfds, NULL, NULL, &tv); in kwboot_tty_recv()
177 if (nfds < 0) in kwboot_tty_recv()
179 if (!nfds) { in kwboot_tty_recv()
540 int nfds = 0; in kwboot_terminal() local
543 nfds = nfds < tty ? tty : nfds; in kwboot_terminal()
547 nfds = nfds < in ? in : nfds; in kwboot_terminal()
550 nfds = select(nfds + 1, &rfds, NULL, NULL, NULL); in kwboot_terminal()
551 if (nfds < 0) in kwboot_terminal()
/third_party/curl/tests/libtest/
Dfirst.c45 int select_wrapper(int nfds, fd_set *rd, fd_set *wr, fd_set *exc, in select_wrapper() argument
48 if(nfds < 0) { in select_wrapper()
58 if(!nfds) { in select_wrapper()
63 return select(nfds, rd, wr, exc, tv); in select_wrapper()
/third_party/glib/gio/
Dgunixoutputstream.c328 int nfds = 0; in g_unix_output_stream_write() local
335 nfds++; in g_unix_output_stream_write()
339 nfds++; in g_unix_output_stream_write()
348 poll_ret = g_poll (poll_fds, nfds, -1); in g_unix_output_stream_write()
384 if (nfds == 2) in g_unix_output_stream_write()
407 int nfds = 0; in g_unix_output_stream_writev() local
442 nfds++; in g_unix_output_stream_writev()
446 nfds++; in g_unix_output_stream_writev()
455 poll_ret = g_poll (poll_fds, nfds, -1); in g_unix_output_stream_writev()
494 if (nfds == 2) in g_unix_output_stream_writev()
/third_party/ltp/testcases/kernel/syscalls/connect/
Dconnect01.c287 int nfds, cc, fd; in do_child() local
293 nfds = sfd + 1; in do_child()
301 if (select(nfds, &rfds, NULL, NULL, in do_child()
312 nfds = MAX(nfds, newfd + 1); in do_child()
315 for (fd = 0; fd < nfds; ++fd) in do_child()
/third_party/ltp/testcases/kernel/syscalls/recv/
Drecv01.c268 int nfds, cc, fd; in do_child() local
273 nfds = sfd + 1; in do_child()
281 if (select(nfds, &rfds, NULL, NULL, in do_child()
292 nfds = MAX(nfds, newfd + 1); in do_child()
297 for (fd = 0; fd < nfds; ++fd) in do_child()
/third_party/ltp/testcases/kernel/syscalls/recvfrom/
Drecvfrom01.c297 int nfds, cc, fd; in do_child() local
302 nfds = sfd + 1; in do_child()
310 if (select(nfds, &rfds, NULL, NULL, in do_child()
321 nfds = MAX(nfds, newfd + 1); in do_child()
326 for (fd = 0; fd < nfds; ++fd) in do_child()
/third_party/ltp/testcases/kernel/syscalls/send/
Dsend01.c211 int nfds, cc, fd; in do_child() local
217 nfds = sfd + 1; in do_child()
225 if (select(nfds, &rfds, NULL, NULL, NULL) < 0) in do_child()
235 nfds = MAX(nfds, newfd + 1); in do_child()
238 for (fd = 0; fd < nfds; ++fd) { in do_child()
/third_party/libusb/libusb/os/
Devents_posix.c222 usbi_nfds_t nfds = (usbi_nfds_t)ctx->event_data_cnt; in usbi_wait_for_events() local
225 usbi_dbg("poll() %u fds with timeout in %dms", (unsigned int)nfds, timeout_ms); in usbi_wait_for_events()
226 num_ready = poll(fds, nfds, timeout_ms); in usbi_wait_for_events()
266 nfds -= internal_fds; in usbi_wait_for_events()
275 for (n = 0; n < nfds; n++) { in usbi_wait_for_events()
294 reported_events->event_data_count = (unsigned int)nfds; in usbi_wait_for_events()
/third_party/ninja/src/
Dsubprocess-posix.cc242 nfds_t nfds = 0; in DoWork() local
251 ++nfds; in DoWork()
255 int ret = ppoll(&fds.front(), nfds, NULL, &old_mask_); in DoWork()
292 int nfds = 0; in DoWork() local
300 if (nfds < fd+1) in DoWork()
301 nfds = fd+1; in DoWork()
306 int ret = pselect(nfds, &set, 0, 0, 0, &old_mask_); in DoWork()
/third_party/node/deps/cares/src/tools/
Dacountry.c205 int nfds; in wait_ares() local
209 nfds = ares_fds(channel, &read_fds, &write_fds); in wait_ares()
210 if (nfds == 0) in wait_ares()
213 nfds = select(nfds, &read_fds, &write_fds, NULL, tvp); in wait_ares()
214 if (nfds < 0) in wait_ares()
Dahost.c59 int status, nfds, c, addr_family = AF_INET; in main() local
155 nfds = ares_fds(channel, &read_fds, &write_fds); in main()
156 if (nfds == 0) in main()
159 res = select(nfds, &read_fds, &write_fds, NULL, tvp); in main()

1234