Home
last modified time | relevance | path

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

12

/illumos-gate/usr/src/lib/libc/port/gen/
H A Dselect.c83 #define fd_set_size(nfds) (((nfds) + (NFDBITS - 1)) / NFDBITS) argument
106 pselect(int nfds, fd_set *in0, fd_set *out0, fd_set *ex0, in pselect() argument
128 if (nfds < 0 || nfds > FD_SETSIZE) { in pselect()
154 if (nfds <= BULK_ALLOC_LIM) { in pselect()
155 p = pfd = alloca(nfds * sizeof (struct pollfd)); in pselect()
157 npfds = fd_sets_count(nfds, in0, out0, ex0); in pselect()
176 for (n = 0; n < nfds; n += NFDBITS) { in pselect()
181 if (p->fd >= nfds) in pselect()
217 for (n = 0; n < nfds; n += NFDBITS) in pselect()
222 for (n = 0; n < nfds; n += NFDBITS) in pselect()
[all …]
H A Dclosefrom.c63 int nfds; in fdwalk() local
66 nfds = 0; in fdwalk()
79 if (fds_sz <= nfds * sizeof (int)) { in fdwalk()
83 fds[nfds++] = i; in fdwalk()
97 if (fds_sz <= nfds * sizeof (int)) { in fdwalk()
101 fds[nfds++] = i; in fdwalk()
115 for (i = 0; i < nfds; i++) in fdwalk()
/illumos-gate/usr/src/cmd/ctwatch/
H A Dctwatch.c234 int i, nfds, nids; in main() local
274 nfds = 0; in main()
287 wfd[nfds].wf_fd = in main()
291 wfd[nfds].wf_type = type = get_type(argv[i]); in main()
293 (void) close(wfd[nfds].wf_fd); in main()
297 nfds++; in main()
336 wfd[nfds].wf_fd = fd; in main()
337 wfd[nfds].wf_type = type; in main()
338 nfds++; in main()
342 if (nfds == 0) in main()
[all …]
/illumos-gate/usr/src/uts/common/syscall/
H A Dpoll.c330 poll_common(pollfd_t *fds, nfds_t nfds, timespec_t *tsp, k_sigset_t *ksetp) in poll_common() argument
385 if (nfds == 0) { in poll_common()
402 if (nfds > p->p_fno_ctl) { in poll_common()
430 if (nfds != old_nfds) { in poll_common()
433 pollfdp = kmem_alloc(nfds * sizeof (pollfd_t), KM_SLEEP); in poll_common()
435 ps->ps_nfds = nfds; in poll_common()
439 if (copyin(fds, pollfdp, nfds * sizeof (pollfd_t))) { in poll_common()
468 pcache_create(pcp, nfds); in poll_common()
500 error = pcacheset_resolve(ps, nfds, &fdcnt, in poll_common()
539 error = pcacheset_resolve(ps, nfds, &fdcnt, cacheindex); in poll_common()
[all …]
/illumos-gate/usr/src/cmd/consadm/
H A Dconsadm.c657 nfds_t nfds = 0; in fallbackdaemon() local
729 fds[nfds].fd = fd; in fallbackdaemon()
730 fds[nfds].events = 0; in fallbackdaemon()
732 if ((devpaths[nfds] = in fallbackdaemon()
736 (void) strcpy(devpaths[nfds], ptr); in fallbackdaemon()
737 nfds++; in fallbackdaemon()
738 if (nfds >= cachesize) in fallbackdaemon()
758 fds[nfds].fd = fd; in fallbackdaemon()
759 fds[nfds].events = 0; in fallbackdaemon()
761 if ((devpaths[nfds] = malloc(strlen(ptr) + 1)) == NULL) in fallbackdaemon()
[all …]
/illumos-gate/usr/src/test/libc-tests/tests/select/
H A Dselect_test.c56 int null, zero, maxfd = -1, nfds; in main() local
62 nfds = atoi(argv[1]); in main()
66 if (nfds > FD_SETSIZE) in main()
96 for (int i = zero; i < (zero + nfds); i++) { in main()
/illumos-gate/usr/src/lib/libslp/clib/
H A Dslp_net.c340 nfds_t nfds; in slp_mc_send() local
349 if (make_mc_target(hp, sin, header, &pfd, &nfds, &bcifs) != SLP_OK) in slp_mc_send()
379 mc_recvmsg(pfd, nfds, hp, scopes, header, &collator, final_to, in slp_mc_send()
391 free_pfds(pfd, nfds); in slp_mc_send()
702 struct pollfd **fds, nfds_t *nfds, in make_mc_target() argument
758 *nfds = num_givenifs; in make_mc_target()
778 free_pfds(*fds, *nfds); in make_mc_target()
861 *nfds = 1; in make_mc_target()
865 for (nfd_i = 0; nfd_i < *nfds; nfd_i++) { in make_mc_target()
1007 static void mc_recvmsg(struct pollfd *pfd, nfds_t nfds, slp_handle_impl_t *hp, in mc_recvmsg() argument
[all …]
/illumos-gate/usr/src/test/os-tests/tests/poll/
H A Dpoll_test.c163 poll_wrapper(pollfd_t *fds, nfds_t nfds, int timeout, time_t *elapsed) in poll_wrapper() argument
168 debug_log("POLL start: (0x%p, %d, %d)\n", fds, nfds, timeout); in poll_wrapper()
170 ret = poll(fds, nfds, timeout); in poll_wrapper()
175 fds, nfds, timeout, ret, (*elapsed)); in poll_wrapper()
181 dppoll(int pollfd, pollfd_t *fds, nfds_t nfds, int timeout, time_t *elapsed) in dppoll() argument
188 arg.dp_nfds = nfds; in dppoll()
191 debug_log("DP_POLL start: (0x%p, %d, %d)\n", fds, nfds, timeout); in dppoll()
/illumos-gate/usr/src/lib/libldap5/sources/ldap/prldap/
H A Dldappr-io.c51 static int LDAP_CALLBACK prldap_poll( LDAP_X_PollFD fds[], int nfds,
227 prldap_poll( LDAP_X_PollFD fds[], int nfds, int timeout, in prldap_poll() argument
240 if ( prsessp->prsess_pollds_count < nfds ) { in prldap_poll()
242 ( nfds + PRLDAP_POLL_ARRAY_GROWTH ) in prldap_poll()
249 prsessp->prsess_pollds_count = nfds + PRLDAP_POLL_ARRAY_GROWTH; in prldap_poll()
255 for ( i = 0; i < nfds; ++i ) { in prldap_poll()
274 rc = PR_Poll( pds, nfds, in prldap_poll()
278 for ( i = 0; i < nfds; ++i ) { in prldap_poll()
/illumos-gate/usr/src/cmd/rm/
H A Drm.c84 static int nfds; variable
212 nfds--; in closeframe()
245 if (nfds >= maxfds) in opendirat()
250 if (nfds < maxfds) in opendirat()
251 maxfds = nfds; in opendirat()
263 nfds++; in opendirat()
/illumos-gate/usr/src/uts/common/io/
H A Ddevpoll.c249 dp_pcache_poll(dp_entry_t *dpep, void *dpbuf, pollcache_t *pcp, nfds_t nfds, in dp_pcache_poll() argument
286 while ((fdcnt < nfds) && !done) { in dp_pcache_poll()
1198 nfds_t nfds; in dpioctl() local
1299 if ((nfds = STRUCT_FGET(dvpoll, dp_nfds)) == 0) { in dpioctl()
1324 size = nfds * (fdsize = sizeof (epoll_event_t)); in dpioctl()
1326 size = nfds * (fdsize = sizeof (pollfd_t)); in dpioctl()
1348 if ((nfds >> 1) > p->p_fno_ctl) { in dpioctl()
1349 nfds = p->p_fno_ctl; in dpioctl()
1350 size = nfds * fdsize; in dpioctl()
1373 pcp, nfds, &fdcnt); in dpioctl()
[all …]
/illumos-gate/usr/src/contrib/mDNSResponder/mDNSPosix/
H A DmDNSPosix.h117 extern void mDNSPosixGetFDSetForSelect(mDNS *m, int *nfds, fd_set *readfds, fd_set *writefds);
126 extern void mDNSPosixGetFDSet(mDNS *m, int *nfds, fd_set *readfds, fd_set *writefds, struct timeval…
H A DmDNSPosix.c662 int nfds = sock->events.fd + 1; in mDNSPlatformTCPWritable() local
666 if (nfds > FD_SETSIZE) in mDNSPlatformTCPWritable()
673 count = select(nfds, NULL, &w, NULL, &tv); in mDNSPlatformTCPWritable()
2015 mDNSlocal void mDNSPosixAddToFDSet(int *nfds, fd_set *readfds, int s) in mDNSPosixAddToFDSet() argument
2017 if (*nfds < s + 1) *nfds = s + 1; in mDNSPosixAddToFDSet()
2021 mDNSexport void mDNSPosixGetFDSetForSelect(mDNS *m, int *nfds, fd_set *readfds, fd_set *writefds) in mDNSPosixGetFDSetForSelect() argument
2023 int numFDs = *nfds; in mDNSPosixGetFDSetForSelect()
2052 *nfds = numFDs; in mDNSPosixGetFDSetForSelect()
2075 mDNSexport void mDNSPosixGetFDSet(mDNS *m, int *nfds, fd_set *readfds, fd_set *writefds, struct tim… in mDNSPosixGetFDSet() argument
2078 mDNSPosixGetFDSetForSelect(m, nfds, readfds, writefds); in mDNSPosixGetFDSet()
/illumos-gate/usr/src/cmd/cmd-inet/usr.bin/ftp/
H A Dftp.c78 static int empty(struct fd_set *mask, int sec, int nfds);
722 empty(struct fd_set *mask, int sec, int nfds) in empty() argument
729 return (select(nfds, mask, NULL, NULL, &t)); in empty()
969 int nfds = fileno(ctrl_in); in sendrequest() local
983 FD_SET(nfds, &mask); in sendrequest()
984 nfds = MAX(dfn, nfds); in sendrequest()
991 (void) select(nfds + 1, &mask, NULL, NULL, NULL); in sendrequest()
1066 int nfds; in recvrequest() local
1401 nfds = fileno(ctrl_in) + 1; in recvrequest()
1406 nfds = MAX(fileno(din) + 1, nfds); in recvrequest()
[all …]
/illumos-gate/usr/src/cmd/krb5/kadmin/server/
H A Dovsec_kadmd.c1243 int nfds = 0; in kadm_svc_run() local
1250 if (nfds != svc_max_pollfd) { in kadm_svc_run()
1252 nfds = svc_max_pollfd; in kadm_svc_run()
1258 for (i = 0; i < nfds; i++) { in kadm_svc_run()
1266 switch(pollret = poll(rfd, nfds, in kadm_svc_run()
1276 for (i = 0; i < nfds; i++) { in kadm_svc_run()
1286 if (i == (nfds - 1)) in kadm_svc_run()
/illumos-gate/usr/src/cmd/ttymon/
H A Dttymon.c87 int nfds; in main() local
122 nfds = set_poll(Pollp); in main()
124 if (nfds > 0) in main()
125 do_poll(Pollp, nfds); in main()
H A Dtmhandler.c213 do_poll(struct pollfd *fdp, int nfds) in do_poll() argument
218 n = poll(fdp, (unsigned long)nfds, -1); /* blocked poll */ in do_poll()
227 for (i = 0; (i < nfds) && (n != 0); i++, fdp++) { in do_poll()
/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/include/
H A Dcm.h30 int max, nfds; member
/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/krb5/os/
H A Dsendto_kdc.c858 selstate->nfds++; in start_connection()
939 selstate->nfds--; in kill_conn()
1180 while (selstate->nfds > 0 in service_fds()
1332 sel_state->nfds = 0; in krb5int_sendto()
1373 if (pass > 0 && sel_state->nfds == 0) in krb5int_sendto()
1394 if (sel_state->nfds == 0) in krb5int_sendto()
1399 if (sel_state->nfds == 0) { in krb5int_sendto()
/illumos-gate/usr/src/cmd/dcs/sparc/sun4u/
H A Ddcs_ses.c475 ses_poll(struct pollfd fds[], nfds_t nfds, int timeout) in ses_poll() argument
482 err = poll(fds, nfds, timeout); in ses_poll()
H A Ddcs.h296 int ses_poll(struct pollfd fds[], nfds_t nfds, int timeout);
/illumos-gate/usr/src/lib/libldap5/sources/ldap/common/
H A Dsasl.c315 LDAP_X_PollFD fds[], int nfds, int timeout, in nsldapi_sasl_poll() argument
330 if (fds && nfds > 0) { in nsldapi_sasl_poll()
331 for(i = 0; i < nfds; i++) { in nsldapi_sasl_poll()
341 return ( ld->ld_sasl_io_fns.lextiof_poll( fds, nfds, timeout, in nsldapi_sasl_poll()
/illumos-gate/usr/src/lib/print/libhttp-core/common/
H A Dhttp.c2099 int nfds; /* Result from select() */ in http_wait() local
2169 nfds = select(http->fd + 1, http->input_set, NULL, NULL, &timeout); in http_wait()
2172 nfds = select(http->fd + 1, http->input_set, NULL, NULL, NULL); in http_wait()
2175 while (nfds < 0 && WSAGetLastError() == WSAEINTR); in http_wait()
2177 while (nfds < 0 && errno == EINTR); in http_wait()
2182 return (nfds > 0); in http_wait()
/illumos-gate/usr/src/cmd/syslogd/
H A Dsyslogd.c576 int nfds, funix; in prepare_sys_poll() local
587 nfds = poll(&Pfd, 1, 0); in prepare_sys_poll()
588 if (nfds <= 0) { in prepare_sys_poll()
613 int nfds; in sys_poll() local
636 nfds = poll(&Pfd, 1, INFTIM); in sys_poll()
638 if (nfds == 0) in sys_poll()
641 if (nfds < 0) { in sys_poll()
789 int nfds, i; in net_poll() local
808 nfds = poll(Nfd, Ninputs, -1); in net_poll()
809 if (nfds == 0) in net_poll()
[all …]
/illumos-gate/usr/src/cmd/fs.d/nfs/lib/
H A Dnfs_tbind.c675 int nfds; in poll_for_action() local
683 nfds = poll(poll_array, num_fds, INFTIM); in poll_for_action()
684 switch (nfds) { in poll_for_action()
717 for (i = 0; i < num_fds && nfds > 0; i++) { in poll_for_action()
719 nfds--; in poll_for_action()

12