Home
last modified time | relevance | path

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

123456

/external/libcups/cups/
Dhttp-addrlist.c69 nfds, /* Number of file descriptors */ in httpAddrConnect2() local
112 nfds = 0; in httpAddrConnect2()
119 while (nfds > 0) in httpAddrConnect2()
121 nfds --; in httpAddrConnect2()
122 httpAddrClose(NULL, fds[nfds]); in httpAddrConnect2()
128 if (addrlist && nfds < (int)(sizeof(fds) / sizeof(fds[0]))) in httpAddrConnect2()
136 if ((fds[nfds] = (int)socket(httpAddrFamily(&(addrlist->addr)), SOCK_STREAM, 0)) < 0) in httpAddrConnect2()
154 setsockopt(fds[nfds], SOL_SOCKET, SO_REUSEADDR, CUPS_SOCAST &val, sizeof(val)); in httpAddrConnect2()
158 setsockopt(fds[nfds], SOL_SOCKET, SO_REUSEPORT, CUPS_SOCAST &val, sizeof(val)); in httpAddrConnect2()
163 setsockopt(fds[nfds], SOL_SOCKET, SO_NOSIGPIPE, CUPS_SOCAST &val, sizeof(val)); in httpAddrConnect2()
[all …]
/external/libevent/
Dpoll.c62 int nfds; /* Highest number used */ member
115 for (i = 0; i < pop->nfds; ++i) { in poll_check_ok()
127 int res, i, j, nfds; in poll_dispatch() local
134 nfds = pop->nfds; in poll_dispatch()
154 sizeof(struct pollfd)*nfds); in poll_dispatch()
171 res = poll(event_set, nfds, msec); in poll_dispatch()
186 if (res == 0 || nfds == 0) in poll_dispatch()
189 i = evutil_weakrand_range_(&base->weakrand_seed, nfds); in poll_dispatch()
190 for (j = 0; j < nfds; j++) { in poll_dispatch()
192 if (++i == nfds) in poll_dispatch()
[all …]
Dselect.c142 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/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()
/external/ipsec-tools/src/racoon/
Dsession.c112 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/strace/
Dpathtrace.c151 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 …]
Ddesc.c79 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()
Dpoll.c56 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/
Dppoll01.c47 unsigned int nfds; /* nfds ppoll parameter */ member
100 .nfds = 1,
108 .nfds = 0,
119 .nfds = 0,
128 .nfds = 1,
136 .nfds = 0,
146 .nfds = 0,
158 .nfds = -1,
166 .nfds = 1,
235 sys_ret = tst_syscall(__NR_ppoll, tc->fds, tc->nfds, tsp, in do_test()
/external/selinux/mcstrans/src/
Dmcstransd.c256 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/strace/tests-m32/
Dxselect.c46 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/
Dxselect.c46 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/
Dxselect.c46 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/mdnsresponder/mDNSPosix/
DExampleClientApp.c51 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/u-boot/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()
534 int nfds = 0; in kwboot_terminal() local
537 nfds = nfds < tty ? tty : nfds; in kwboot_terminal()
541 nfds = nfds < in ? in : nfds; in kwboot_terminal()
544 nfds = select(nfds + 1, &rfds, NULL, NULL, NULL); in kwboot_terminal()
545 if (nfds < 0) in kwboot_terminal()
/external/openssh/openbsd-compat/
Dbsd-poll.c41 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/
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()
/external/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()
/external/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()
/external/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()
/external/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()
/external/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()
/external/v4l2_codec2/vda/
Dv4l2_device.cc144 nfds_t nfds; in Poll() local
149 nfds = 1; in Poll()
153 pollfds[nfds].fd = device_fd_.get(); in Poll()
154 pollfds[nfds].events = POLLIN | POLLOUT | POLLERR | POLLPRI; in Poll()
155 pollfd = nfds; in Poll()
156 nfds++; in Poll()
159 if (HANDLE_EINTR(poll(pollfds, nfds, -1)) == -1) { in Poll()
/external/ltp/testcases/kernel/syscalls/sendto/
Dsendto01.c282 int nfds, cc, fd; in do_child() local
287 nfds = sfd + 1; in do_child()
295 if (select(nfds, &rfds, NULL, NULL, NULL) < 0 && errno != EINTR) in do_child()
305 nfds = MAX(nfds, newfd + 1); in do_child()
308 for (fd = 0; fd < nfds; ++fd) { in do_child()
/external/grpc-grpc/test/core/iomgr/
Dwakeup_fd_cv_test.cc35 nfds_t nfds; member
59 int mock_poll(struct pollfd* fds, nfds_t nfds, int timeout) { in mock_poll() argument
63 GPR_ASSERT(nfds == 3); in mock_poll()
88 pargs->result = grpc_poll_function(pargs->fds, pargs->nfds, pargs->timeout); in background_poll()
132 pargs.nfds = 6; in test_poll_cv_trigger()

123456