/external/libcups/cups/ |
D | http-addrlist.c | 66 int nfds, /* Number of file descriptors */ in httpAddrConnect2() local 110 nfds = 0; in httpAddrConnect2() 117 while (nfds > 0) in httpAddrConnect2() 119 nfds --; in httpAddrConnect2() 120 httpAddrClose(NULL, fds[nfds]); in httpAddrConnect2() 126 if (addrlist && nfds < (int)(sizeof(fds) / sizeof(fds[0]))) in httpAddrConnect2() 134 if ((fds[nfds] = (int)socket(httpAddrFamily(&(addrlist->addr)), SOCK_STREAM, 0)) < 0) in httpAddrConnect2() 152 setsockopt(fds[nfds], SOL_SOCKET, SO_REUSEADDR, CUPS_SOCAST &val, sizeof(val)); in httpAddrConnect2() 156 setsockopt(fds[nfds], SOL_SOCKET, SO_REUSEPORT, CUPS_SOCAST &val, sizeof(val)); in httpAddrConnect2() 161 setsockopt(fds[nfds], SOL_SOCKET, SO_NOSIGPIPE, CUPS_SOCAST &val, sizeof(val)); in httpAddrConnect2() [all …]
|
/external/rust/crates/nix/test/ |
D | test_poll.rs | 12 Ok(nfds) => break nfds, 26 let nfds = loop_while_eintr!(poll(&mut fds, 100)); in test_poll() localVariable 27 assert_eq!(nfds, 0); in test_poll() 33 let nfds = poll(&mut fds, 100).unwrap(); in test_poll() localVariable 34 assert_eq!(nfds, 1); in test_poll() 57 let nfds = loop_while_eintr!(ppoll(&mut fds, Some(timeout), sigset)); in test_ppoll() localVariable 58 assert_eq!(nfds, 0); in test_ppoll() 64 let nfds = ppoll(&mut fds, Some(timeout), SigSet::empty()).unwrap(); in test_ppoll() localVariable 65 assert_eq!(nfds, 1); in test_ppoll()
|
/external/ltp/testcases/kernel/syscalls/dup/ |
D | dup03.c | 125 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()
|
/external/libevent/ |
D | poll.c | 73 int nfds; /* Highest number used */ member 126 for (i = 0; i < pop->nfds; ++i) { in poll_check_ok() 138 int res, i, j, nfds; in poll_dispatch() local 145 nfds = pop->nfds; in poll_dispatch() 165 sizeof(struct pollfd)*nfds); in poll_dispatch() 182 res = poll(event_set, nfds, msec); in poll_dispatch() 197 if (res == 0 || nfds == 0) in poll_dispatch() 200 i = evutil_weakrand_range_(&base->weakrand_seed, nfds); in poll_dispatch() 201 for (j = 0; j < nfds; j++) { in poll_dispatch() 203 if (++i == nfds) in poll_dispatch() [all …]
|
D | select.c | 142 int res=0, i, j, nfds; in select_dispatch() local 168 nfds = sop->event_fds+1; in select_dispatch() 172 res = select(nfds, sop->event_readset_out, in select_dispatch() 191 i = evutil_weakrand_range_(&base->weakrand_seed, nfds); in select_dispatch() 192 for (j = 0; j < nfds; ++j) { in select_dispatch() 193 if (++i >= nfds) in select_dispatch()
|
/external/rust/crates/grpcio-sys/grpc/third_party/cares/cares/ |
D | ares_fds.c | 26 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()
|
/external/ipsec-tools/src/racoon/ |
D | session.c | 112 static int nfds = 0; variable 195 error = select(nfds, &rfds, (fd_set *)0, (fd_set *)0, timeout); in session() 267 nfds = 0; in initfds() 284 nfds = (nfds > lcconf->sock_admin ? nfds : lcconf->sock_admin); in initfds() 293 nfds = (nfds > lcconf->sock_pfkey ? nfds : lcconf->sock_pfkey); in initfds() 300 nfds = (nfds > lcconf->rtsock ? nfds : lcconf->rtsock); in initfds() 311 nfds = (nfds > p->sock ? nfds : p->sock); in initfds() 313 nfds++; in initfds()
|
/external/ltp/testcases/kernel/syscalls/select/ |
D | select_var.h | 18 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()
|
/external/strace/ |
D | pathtrace.c | 151 int nfds = (int) args[0]; in match_xselect_args() local 153 if (nfds <= 0) in match_xselect_args() 156 if (nfds > 1024*1024) in match_xselect_args() 157 nfds = 1024*1024; in match_xselect_args() 158 unsigned int fdsize = (((nfds + 7) / 8) + current_wordsize-1) & -current_wordsize; in match_xselect_args() 167 j = next_set_bit(fds, j, nfds); in match_xselect_args() 312 unsigned nfds; in pathtrace_match_set() local 316 nfds = tcp->u_arg[1]; in pathtrace_match_set() 318 if (nfds > 1024 * 1024) in pathtrace_match_set() 319 nfds = 1024 * 1024; in pathtrace_match_set() [all …]
|
D | desc.c | 79 int nfds, fdsize; in decode_select() local 85 nfds = (int) args[0]; in decode_select() 88 if (nfds < 0) in decode_select() 89 nfds = 0; in decode_select() 92 if (nfds > 1024*1024) in decode_select() 93 nfds = 1024*1024; in decode_select() 99 fdsize = (((nfds + 7) / 8) + current_wordsize-1) & -current_wordsize; in decode_select() 117 j = next_set_bit(fds, j, nfds); in decode_select() 155 j = next_set_bit(fds, j, nfds); in decode_select()
|
D | poll.c | 56 const unsigned int nfds = tcp->u_arg[1]; in decode_poll_entering() local 59 print_array(tcp, addr, nfds, &fds, sizeof(fds), in decode_poll_entering() 61 tprintf(", %u, ", nfds); in decode_poll_entering() 68 const unsigned int nfds = tcp->u_arg[1]; in decode_poll_exiting() local 69 const unsigned long size = sizeof(fds) * nfds; in decode_poll_exiting() 88 if (!verbose(tcp) || !start || !nfds || in decode_poll_exiting() 89 size / sizeof(fds) != nfds || end < start) in decode_poll_exiting()
|
/external/ltp/testcases/kernel/syscalls/ppoll/ |
D | ppoll01.c | 38 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()
|
/external/selinux/mcstrans/src/ |
D | mcstransd.c | 256 add_pollfd(struct pollfd **ufds, int *nfds, int connfd) in add_pollfd() argument 261 for (ii = 0; ii < *nfds; ii++) { in add_pollfd() 266 if (ii == *nfds) { in add_pollfd() 268 (*nfds+1)*sizeof(struct pollfd)); in add_pollfd() 270 syslog(LOG_ERR, "realloc failed for %d fds", *nfds+1); in add_pollfd() 275 (*nfds)++; in add_pollfd() 286 adj_pollfds(struct pollfd **ufds, int *nfds) in adj_pollfds() argument 291 for (ii = 0; ii < *nfds; ii++) { in adj_pollfds() 298 *nfds = jj; in adj_pollfds() 302 process_events(struct pollfd **ufds, int *nfds) in process_events() argument [all …]
|
/external/libcups/backend/ |
D | runloop.c | 28 int nfds; /* Maximum file descriptor value + 1 */ in backendDrainOutput() local 44 nfds = (print_fd > device_fd ? print_fd : device_fd) + 1; in backendDrainOutput() 62 if (select(nfds, &input, NULL, NULL, &timeout) < 0) in backendDrainOutput() 137 int nfds; /* Maximum file descriptor value + 1 */ in backendRunLoop() local 196 nfds = (print_fd > device_fd ? print_fd : device_fd) + 1; in backendRunLoop() 226 if (select(nfds, &input, &output, NULL, &timeout) < 0) in backendRunLoop() 423 int nfds; /* Number of file descriptors */ in backendWaitLoop() local 457 nfds = select(CUPS_SC_FD + 1, &input, NULL, NULL, &timeout); in backendWaitLoop() 460 nfds = select(CUPS_SC_FD + 1, &input, NULL, NULL, NULL); in backendWaitLoop() 462 if (nfds < 0) in backendWaitLoop()
|
/external/libcups/scheduler/ |
D | select.c | 401 int nfds; /* Number of file descriptors */ in cupsdDoSelect() local 416 nfds = kevent(cupsd_kqueue_fd, NULL, 0, cupsd_kqueue_events, MaxFDs, in cupsdDoSelect() 420 nfds = kevent(cupsd_kqueue_fd, NULL, 0, cupsd_kqueue_events, MaxFDs, NULL); in cupsdDoSelect() 424 for (i = nfds, event = cupsd_kqueue_events; i > 0; i --, event ++) in cupsdDoSelect() 458 nfds = epoll_wait(cupsd_epoll_fd, cupsd_epoll_events, MaxFDs, in cupsdDoSelect() 461 nfds = epoll_wait(cupsd_epoll_fd, cupsd_epoll_events, MaxFDs, -1); in cupsdDoSelect() 463 if (nfds < 0 && errno != EINTR) in cupsdDoSelect() 470 for (i = nfds, event = cupsd_epoll_events; i > 0; i --, event ++) in cupsdDoSelect() 550 nfds = poll(cupsd_pollfds, (nfds_t)count, timeout * 1000); in cupsdDoSelect() 552 nfds = poll(cupsd_pollfds, (nfds_t)count, -1); in cupsdDoSelect() [all …]
|
/external/mdnsresponder/mDNSPosix/ |
D | ExampleClientApp.c | 51 int nfds = 0; in ExampleClientEventLoop() local 68 mDNSPosixGetFDSet(m, &nfds, &readfds, &timeout); in ExampleClientEventLoop() 71 verbosedebugf("select(%d, %d.%06d)", nfds, timeout.tv_sec, timeout.tv_usec); in ExampleClientEventLoop() 72 result = select(nfds, &readfds, NULL, NULL, &timeout); in ExampleClientEventLoop()
|
/external/strace/tests-m32/ |
D | xselect.c | 46 xselect(const kernel_ulong_t nfds, in xselect() argument 54 F8ILL_KULONG_MASK | nfds, rs, ws, es, tv); in xselect() 93 const int nfds = fds[1] + 1; in main() local 94 if (nfds > smallset_size) in main() 96 nfds, smallset_size); in main() 142 for (int i = nfds; i <= smallset_size; ++i) { in main() 171 rc = xselect(nfds, a_rs, a_rs, a_rs, a_tv); in main() 176 TEST_SYSCALL_STR, nfds, fds[0], fds[1], in main() 187 TEST_SYSCALL_STR, nfds, fds[0], fds[1], in main() 203 rc = xselect(nfds, a_rs, a_rs, a_rs, a_tv); in main() [all …]
|
/external/strace/tests-mx32/ |
D | xselect.c | 46 xselect(const kernel_ulong_t nfds, in xselect() argument 54 F8ILL_KULONG_MASK | nfds, rs, ws, es, tv); in xselect() 93 const int nfds = fds[1] + 1; in main() local 94 if (nfds > smallset_size) in main() 96 nfds, smallset_size); in main() 142 for (int i = nfds; i <= smallset_size; ++i) { in main() 171 rc = xselect(nfds, a_rs, a_rs, a_rs, a_tv); in main() 176 TEST_SYSCALL_STR, nfds, fds[0], fds[1], in main() 187 TEST_SYSCALL_STR, nfds, fds[0], fds[1], in main() 203 rc = xselect(nfds, a_rs, a_rs, a_rs, a_tv); in main() [all …]
|
/external/strace/tests/ |
D | xselect.c | 46 xselect(const kernel_ulong_t nfds, in xselect() argument 54 F8ILL_KULONG_MASK | nfds, rs, ws, es, tv); in xselect() 93 const int nfds = fds[1] + 1; in main() local 94 if (nfds > smallset_size) in main() 96 nfds, smallset_size); in main() 142 for (int i = nfds; i <= smallset_size; ++i) { in main() 171 rc = xselect(nfds, a_rs, a_rs, a_rs, a_tv); in main() 176 TEST_SYSCALL_STR, nfds, fds[0], fds[1], in main() 187 TEST_SYSCALL_STR, nfds, fds[0], fds[1], in main() 203 rc = xselect(nfds, a_rs, a_rs, a_rs, a_tv); in main() [all …]
|
/external/openssh/openbsd-compat/ |
D | bsd-poll.c | 41 poll(struct pollfd *fds, nfds_t nfds, int timeout) in poll() argument 49 for (i = 0; i < nfds; i++) { in poll() 68 for (i = 0; i < nfds; i++) { in poll() 93 for (i = 0; i < nfds; i++) { in poll()
|
/external/curl/tests/libtest/ |
D | first.c | 45 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()
|
/external/ltp/testcases/kernel/syscalls/recv/ |
D | recv01.c | 268 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()
|
/external/ltp/testcases/kernel/syscalls/connect/ |
D | connect01.c | 287 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()
|
/external/ltp/testcases/kernel/syscalls/recvfrom/ |
D | recvfrom01.c | 297 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()
|
/external/ltp/testcases/kernel/syscalls/send/ |
D | send01.c | 211 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()
|