Home
last modified time | relevance | path

Searched refs:nfds (Results 1 - 25 of 130) sorted by relevance

123456

/third_party/ltp/testcases/kernel/syscalls/dup/
H A Ddup03.c18 static int nfds; variable
37 for (nfds = 1; nfds < maxfds; nfds++) { in setup()
38 fd[nfds] = SAFE_DUP(fd[0]); in setup()
39 if (fd[nfds] >= maxfds - 1) in setup()
48 for (i = 0; i < nfds; i++) in cleanup()
/third_party/rust/crates/nix/test/
H A Dtest_poll.rs11 Ok(nfds) => break nfds,
25 let nfds = loop_while_eintr!(poll(&mut fds, 100)); in test_poll()
26 assert_eq!(nfds, 0); in test_poll()
32 let nfds = poll(&mut fds, 100).unwrap(); in test_poll()
33 assert_eq!(nfds, 1); in test_poll()
58 let nfds = loop_while_eintr!(ppoll(&mut fds, Some(timeout), Some(sigset))); in test_ppoll()
59 assert_eq!(nfds, 0); in test_ppoll()
65 let nfds = ppoll(&mut fds, Some(timeout), None).unwrap(); in test_ppoll()
66 assert_eq!(nfds, in test_ppoll()
[all...]
/third_party/ltp/testcases/kernel/syscalls/ppoll/
H A Dppoll01.c40 unsigned int nfds; /* nfds ppoll parameter */ member
76 * EINVAL v ('nfds' is over the 'RLIMIT_NOFILE' value)
86 .nfds = 1,
94 .nfds = 0,
105 .nfds = 0,
114 .nfds = 1,
122 .nfds = 0,
132 .nfds = 0,
144 .nfds
158 libc_ppoll(struct pollfd *fds, nfds_t nfds, void *tmo_p, const sigset_t *sigmask, size_t sigsetsize LTP_ATTRIBUTE_UNUSED) libc_ppoll() argument
165 sys_ppoll(struct pollfd *fds, nfds_t nfds, void *tmo_p, const sigset_t *sigmask, size_t sigsetsize) sys_ppoll() argument
171 sys_ppoll_time64(struct pollfd *fds, nfds_t nfds, void *tmo_p, const sigset_t *sigmask, size_t sigsetsize) sys_ppoll_time64() argument
[all...]
/third_party/ltp/testcases/kernel/syscalls/select/
H A 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/uv/src/unix/
H A 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 in uv__io_poll()
[all...]
H A 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 in uv__platform_invalidate_fd()
[all...]
H A 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()
157 unsigned int nfds; in uv__io_poll() local
168 if (loop->nfds == 0) { in uv__io_poll()
224 /* Work around a kernel bug where nfds is not updated. */ in uv__io_poll()
227 nfds = 1; in uv__io_poll()
236 &nfds, in uv__io_poll()
275 if (nfds == 0) { in uv__io_poll()
285 loop->watchers[loop->nwatchers + 1] = (void*) (uintptr_t) nfds; in uv__io_poll()
[all...]
/third_party/node/deps/cares/src/lib/
H A Dares_fds.c35 ares_socket_t nfds; in ares_fds() local
48 nfds = 0; in ares_fds()
70 if (conn->fd >= nfds) { in ares_fds()
71 nfds = conn->fd + 1; in ares_fds()
82 return (int)nfds; in ares_fds()
H A Dares_event_select.c80 int nfds = 0; in ares_evsys_select_wait() local
96 if (ev->fd + 1 > nfds) { in ares_evsys_select_wait()
97 nfds = ev->fd + 1; in ares_evsys_select_wait()
107 rv = select(nfds, &read_fds, &write_fds, NULL, tout); in ares_evsys_select_wait()
/third_party/alsa-utils/alsamixer/
H A Dmainloop.c75 int nfds = 0, n; in mainloop() local
90 if (n != nfds) { in mainloop()
92 nfds = n; in mainloop()
93 pollfds = ccalloc(nfds, sizeof *pollfds); in mainloop()
97 err = snd_mixer_poll_descriptors(mixer, &pollfds[1], nfds - 1); in mainloop()
100 n = poll(pollfds, nfds, -1); in mainloop()
114 err = snd_mixer_poll_descriptors_revents(mixer, &pollfds[1], nfds - 1, &revents); in mainloop()
/third_party/NuttX/fs/vfs/
H A Dfs_select.c81 * nfds - the maximum fd number (+1) of any descriptor in any of the
96 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()
H A 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()
376 * nfds - The number of entries in the list
389 * EINVAL - The nfds value exceeds a system limit.
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/libuv/src/unix/
H A Dkqueue.c150 int nfds; in uv__io_poll() local
157 if (loop->nfds == 0) { in uv__io_poll()
259 nfds = kevent(loop->backend_fd, in uv__io_poll()
266 if (nfds == -1) in uv__io_poll()
268 else if (nfds == 0) in uv__io_poll()
281 if (nfds == 0 || nfds == -1) { in uv__io_poll()
294 } else if (nfds == 0) { in uv__io_poll()
307 loop->watchers[loop->nwatchers + 1] = (void*) (uintptr_t) nfds; in uv__io_poll()
308 for (i = 0; i < nfds; in uv__io_poll()
444 uintptr_t nfds; uv__platform_invalidate_fd() local
[all...]
H A 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()
157 unsigned int nfds; in uv__io_poll() local
168 if (loop->nfds == 0) { in uv__io_poll()
224 /* Work around a kernel bug where nfds is not updated. */ in uv__io_poll()
227 nfds = 1; in uv__io_poll()
236 &nfds, in uv__io_poll()
275 if (nfds == 0) { in uv__io_poll()
285 loop->watchers[loop->nwatchers + 1] = (void*) (uintptr_t) nfds; in uv__io_poll()
[all...]
/third_party/pulseaudio/src/pulsecore/
H A Dpoll.h61 #define pa_poll(fds,nfds,timeout) poll((fds),(nfds),(timeout))
63 int pa_poll(struct pollfd *fds, unsigned long nfds, int timeout);
H A 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/ltp/testcases/kernel/syscalls/connect/
H A 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/send/
H A 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/recv/
H A 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/pselect/
H A Dpselect02.c13 * - EINVAL if nfds was negative
23 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()
/third_party/musl/libc-test/src/functionalext/supplement/fortify/fortify_gtest/
H A Dfortify_poll_chk_test.cpp42 nfds_t nfds = 1; in HWTEST_F() local
43 size_t fdsLen = sizeof(struct pollfd) * (nfds - 1); in HWTEST_F()
44 EXPECT_DEATH(__poll_chk(fds, nfds, TIME_OUT, fdsLen), ""); in HWTEST_F()
/third_party/ninja/src/
H A 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/curl/tests/libtest/
H A 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/libfuse/example/
H A 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/curl/lib/
H A Dselect.c272 int Curl_poll(struct pollfd ufds[], unsigned int nfds, timediff_t timeout_ms) in Curl_poll() argument
287 for(i = 0; i < nfds; i++) { in Curl_poll()
317 r = poll(ufds, nfds, pending_ms); in Curl_poll()
325 for(i = 0; i < nfds; i++) { in Curl_poll()
341 for(i = 0; i < nfds; i++) { in Curl_poll()
374 for(i = 0; i < nfds; i++) { in Curl_poll()

Completed in 10 milliseconds

123456