Home
last modified time | relevance | path

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

12345

/third_party/ltp/testcases/kernel/syscalls/ppoll/
Dppoll01.c40 unsigned int nfds; /* nfds ppoll parameter */ member
86 .nfds = 1,
94 .nfds = 0,
105 .nfds = 0,
114 .nfds = 1,
122 .nfds = 0,
132 .nfds = 0,
144 .nfds = -1,
152 .nfds = 1,
158 static inline int libc_ppoll(struct pollfd *fds, nfds_t nfds, void *tmo_p, in libc_ppoll() argument
[all …]
/third_party/rust/crates/nix/test/
Dtest_poll.rs11 Ok(nfds) => break nfds,
25 let nfds = loop_while_eintr!(poll(&mut fds, 100)); in test_poll() localVariable
26 assert_eq!(nfds, 0); in test_poll()
32 let nfds = poll(&mut fds, 100).unwrap(); in test_poll() localVariable
33 assert_eq!(nfds, 1); in test_poll()
58 let nfds = loop_while_eintr!(ppoll(&mut fds, Some(timeout), Some(sigset))); in test_ppoll() localVariable
59 assert_eq!(nfds, 0); in test_ppoll()
65 let nfds = ppoll(&mut fds, Some(timeout), None).unwrap(); in test_ppoll() localVariable
66 assert_eq!(nfds, 1); in test_ppoll()
/third_party/ltp/testcases/kernel/syscalls/select/
Dselect_var.h21 static int do_select_faulty_to(int nfds, fd_set *readfds, fd_set *writefds, in do_select_faulty_to() argument
26 return select(nfds, readfds, writefds, exceptfds, timeout); in do_select_faulty_to()
30 return tst_syscall(__NR_select, nfds, readfds, writefds, exceptfds, timeout); in do_select_faulty_to()
33 ._n = (long)nfds, in do_select_faulty_to()
56 ret = tst_syscall(__NR_pselect6, nfds, readfds, writefds, exceptfds, ts, NULL); in do_select_faulty_to()
77 ret = tst_syscall(__NR_pselect6_time64, nfds, readfds, writefds, exceptfds, ts, NULL); in do_select_faulty_to()
89 return tst_syscall(__NR__newselect, nfds, readfds, writefds, exceptfds, timeout); in do_select_faulty_to()
99 static inline int do_select(int nfds, fd_set *readfds, fd_set *writefds, in do_select() argument
102 return do_select_faulty_to(nfds, readfds, writefds, exceptfds, timeout, 0); in do_select()
/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/ltp/testcases/kernel/syscalls/dup/
Ddup03.c20 int nfds; variable
55 for (nfds = 1; nfds < maxfds; nfds++) { in setup()
56 fd[nfds] = SAFE_DUP(fd[0]); in setup()
57 if (fd[nfds] >= maxfds - 1) in setup()
66 for (i = 0; i < nfds; i++) in cleanup()
/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 …]
Dsunos.c117 uintptr_t nfds; in uv__platform_invalidate_fd() local
123 nfds = (uintptr_t) loop->watchers[loop->nwatchers + 1]; in uv__platform_invalidate_fd()
128 for (i = 0; i < nfds; i++) in uv__platform_invalidate_fd()
158 unsigned int nfds; in uv__io_poll() local
169 if (loop->nfds == 0) { in uv__io_poll()
228 nfds = 1; in uv__io_poll()
237 &nfds, in uv__io_poll()
276 if (nfds == 0) { in uv__io_poll()
286 loop->watchers[loop->nwatchers + 1] = (void*) (uintptr_t) nfds; in uv__io_poll()
287 for (i = 0; i < nfds; i++) { in uv__io_poll()
[all …]
/third_party/alsa-utils/alsamixer/
Dmainloop.c72 int nfds = 0, n; in mainloop() local
87 if (n != nfds) { in mainloop()
89 nfds = n; in mainloop()
90 pollfds = ccalloc(nfds, sizeof *pollfds); in mainloop()
94 err = snd_mixer_poll_descriptors(mixer, &pollfds[1], nfds - 1); in mainloop()
97 n = poll(pollfds, nfds, -1); in mainloop()
111 err = snd_mixer_poll_descriptors_revents(mixer, &pollfds[1], nfds - 1, &revents); in mainloop()
/third_party/NuttX/fs/vfs/
Dfs_select.c96 int do_select(int nfds, fd_set *readfds, fd_set *writefds, in do_select() argument
108 if (nfds < 0 || nfds >= FD_SETSIZE) in do_select()
118 for (fd = 0, npfds = 0; fd < nfds; fd++) in do_select()
186 for (fd = 0, ndx = 0; fd < nfds; fd++) in do_select()
317 int select(int nfds, fd_set *readfds, fd_set *writefds, in select() argument
320 return do_select(nfds, readfds, writefds, exceptfds, timeout, poll); in select()
Dfs_poll.c274 static int query_fds(struct pollfd *fds, nfds_t nfds, poll_table *wait) in query_fds() argument
280 if ((nfds != 0 && fds == NULL) || wait == NULL || wait->wait == NULL) in query_fds()
286 for (i = 0; i < nfds; ++i) in query_fds()
396 int poll(struct pollfd *fds, nfds_t nfds, int timeout) in poll() argument
420 count = query_fds(fds, nfds, &wait_table); in poll()
493 count = query_fds(fds, nfds, &wait_table); in poll()
/third_party/pulseaudio/src/pulsecore/
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()
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);
/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/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/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/ninja/src/
Dsubprocess-posix.cc254 nfds_t nfds = 0; in DoWork() local
263 ++nfds; in DoWork()
267 int ret = ppoll(&fds.front(), nfds, NULL, &old_mask_); in DoWork()
304 int nfds = 0; in DoWork() local
312 if (nfds < fd+1) in DoWork()
313 nfds = fd+1; in DoWork()
318 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()
/third_party/ltp/testcases/kernel/syscalls/recvmsg/
Drecvmsg01.c429 int nfds, cc, fd; in do_child() local
435 nfds = MAX(sfd + 1, ufd + 1); in do_child()
443 if (select(nfds, &rfds, NULL, NULL, in do_child()
458 nfds = MAX(nfds, newfd + 1); in do_child()
470 nfds = MAX(nfds, newfd + 1); in do_child()
473 for (fd = 0; fd < nfds; ++fd) in do_child()
/third_party/rust/crates/nix/src/sys/
Dselect.rs177 nfds: N, in select()
195 let nfds = nfds.into().unwrap_or_else(|| { in select() localVariable
220 unsafe { libc::select(nfds, readfds, writefds, errorfds, timeout) }; in select()
259 pub fn pselect<'a, N, R, W, E, T, S>(nfds: N,
279 let nfds = nfds.into().unwrap_or_else(|| { localVariable
295 libc::pselect(nfds, readfds, writefds, errorfds, timeout, sigmask)
/third_party/libfuse/example/
Dpoll_client.c41 int i, nfds, tries; in main() local
51 nfds = fds[FSEL_FILES - 1] + 1; in main()
62 rc = select(nfds, &rfds, NULL, NULL, NULL); in main()
/third_party/ltp/testcases/kernel/syscalls/pselect/
Dpselect02.c23 int nfds; member
52 TST_EXP_FAIL(pselect(tc->nfds, tc->readfds, NULL, NULL, tc->timeout, NULL), in pselect_verify()
54 tc->nfds, tc->readfds, tc->timeout); in pselect_verify()

12345