/freebsd-10.2-release/contrib/netbsd-tests/lib/libc/sys/ |
H A D | t_mmap.c | 113 int fds[2]; local 121 if (socketpair(AF_LOCAL, SOCK_STREAM, PF_UNSPEC, fds) != 0) 126 if (setsockopt(fds[1], SOL_SOCKET, SO_RCVBUF, &val, sizeof(val)) != 0) 131 if (setsockopt(fds[0], SOL_SOCKET, SO_SNDBUF, &val, sizeof(val)) != 0) 134 if (fcntl(fds[0], F_SETFL, O_NONBLOCK) != 0) 137 nwritten = write(fds[0], (char *)vp + page, BUFSIZE - page); 145 nread = read(fds[1], buf + page, BUFSIZE - page); 156 ATF_REQUIRE(close(fds[0]) == 0); 157 ATF_REQUIRE(close(fds[1]) == 0);
|
/freebsd-10.2-release/sbin/dhclient/ |
H A D | dispatch.c | 149 struct pollfd *fds; local 155 fds = malloc(nfds * sizeof(struct pollfd)); 156 if (fds == NULL) 197 fds[i].fd = l->fd; 198 fds[i].events = POLLIN; 199 fds[i].revents = 0; 208 count = poll(fds, nfds, to_msec); 226 if ((fds[i].revents & (POLLIN | POLLHUP))) { 227 fds[i].revents = 0;
|
/freebsd-10.2-release/contrib/ntp/libntp/ |
H A D | ntp_worker.c | 48 int fds[2]; local 52 rc = socketpair(AF_UNIX, SOCK_STREAM, 0, &fds[0]); 58 rc = pipe(&fds[0]); 67 caller_fds[0] = fds[0]; 68 caller_fds[1] = fds[1];
|
/freebsd-10.2-release/tools/tools/netrate/netreceive/ |
H A D | netreceive.c | 104 struct pollfd fds; local 107 fds.fd = t->fd; 108 fds.events = POLLIN; 111 if (poll(&fds, 1, -1) < 0) 113 if (!(fds.revents & POLLIN))
|
/freebsd-10.2-release/contrib/netbsd-tests/lib/libc/ttyio/ |
H A D | t_ptm.c | 129 int fdm, fds; local 152 REQUIRE_ERRNO((fds = open(pty, O_RDWR|O_NOCTTY)), -1); 153 REQUIRE_ERRNO(fstat(fds, &sts), -1);
|
/freebsd-10.2-release/crypto/heimdal/appl/ftp/ftpd/ |
H A D | popen.c | 74 static int fds; variable 119 fds = getdtablesize(); 120 pids = (int*)calloc(fds, sizeof(int));
|
/freebsd-10.2-release/tools/tools/net80211/w00t/assoc/ |
H A D | assoc.c | 808 fd_set fds; local 810 FD_ZERO(&fds); 811 FD_SET(p.rx, &fds); 818 rc = select(p.rx+1, &fds, NULL, 891 fd_set fds; local 894 FD_ZERO(&fds); 895 FD_SET(p.rx, &fds); 896 FD_SET(p.tap, &fds); 899 max = select(max+1, &fds, NULL, NULL, NULL); 903 if (FD_ISSET(p.tap, &fds)) { [all...] |
/freebsd-10.2-release/contrib/unbound/util/ |
H A D | mini_event.h | 39 * The back end is only select. Max number of fds is limited. 43 * Although limited to select() and a max (1024) open fds, it 46 * o handler calling takes time ~ to the number of fds. 101 struct event** fds; member in struct:event_base 104 /** capacity - size of the fds array */ 106 /* fdset for read write, for fds ready, and added */ 108 /** fds for reading */ 110 /** fds for writing */ 112 /** fds determined ready for use */
|
/freebsd-10.2-release/contrib/amd/amd/ |
H A D | info_exec.c | 69 fd_set fds; local 114 FD_ZERO(&fds); 115 FD_SET(rdfd, &fds); 117 rval = select(rdfd+1, &fds, 0, 0, &timeo);
|
H A D | nfs_start.c | 77 dlog("%d new fds allocated; total is %d", 101 do_select(sigset_t smask, int fds, fd_set *fdp, struct timeval *tvp) argument 103 do_select(int smask, int fds, fd_set *fdp, struct timeval *tvp) 138 nsel = select(fds, fdp, (fd_set *) 0, (fd_set *) 0,
|
/freebsd-10.2-release/sys/compat/svr4/ |
H A D | svr4_filio.c | 71 pa.fds = uap->fds; 80 if ((cerr = copyin(uap->fds, pfd, siz)) != 0) { 90 if ((cerr = copyout(pfd, uap->fds, siz)) != 0) {
|
/freebsd-10.2-release/usr.bin/su/ |
H A D | su.c | 169 int temp, fds[2]; local 441 if (pipe(fds) == -1) { 450 close(fds[0]); 454 close(fds[1]); 481 close(fds[1]); 482 read(fds[0], &temp, 1); 483 close(fds[0]);
|
/freebsd-10.2-release/lib/libusb/ |
H A D | libusb10_io.c | 101 struct pollfd *fds; local 116 fds = alloca(sizeof(*fds) * nfds); 117 if (fds == NULL) 125 fds[i].fd = pfd->pollfd.fd; 126 fds[i].events = pfd->pollfd.events; 127 fds[i].revents = 0; 140 err = poll(fds, nfds, timeout); 162 if (fds[i].revents == 0) 182 if (read(fds[ [all...] |
/freebsd-10.2-release/bin/pax/ |
H A D | ar_io.c | 1254 int fds[2]; local 1257 if (pipe(fds) < 0) 1266 dup2(fds[1], fd); 1268 dup2(fds[0], fd); 1269 close(fds[0]); 1270 close(fds[1]); 1273 dup2(fds[0], STDIN_FILENO); 1277 dup2(fds[1], STDOUT_FILENO); 1281 close(fds[0]); 1282 close(fds[ [all...] |
/freebsd-10.2-release/tools/tools/net80211/w00t/prga/ |
H A D | prga.c | 338 fd_set fds; local 367 FD_ZERO(&fds); 368 FD_SET(p->rx, &fds); 369 if (select(p->rx+1, &fds, NULL, NULL, &now) == -1) 372 if (!FD_ISSET(p->rx, &fds)) 405 fd_set fds; local 428 FD_ZERO(&fds); 429 FD_SET(p->rx, &fds); 430 if (select(p->rx+1, &fds, NULL, NULL, &now) == -1) 433 if (!FD_ISSET(p->rx, &fds)) [all...] |
/freebsd-10.2-release/sys/kern/ |
H A D | sys_generic.c | 150 STAILQ_ENTRY(selfd) sf_link; /* (k) fds owned by this td. */ 151 TAILQ_ENTRY(selfd) sf_threads; /* (f) fds on this selinfo. */ 1221 * Traverse the list of fds attached to this thread's seltd and check for 1317 return (kern_poll(td, uap->fds, uap->nfds, tsp, NULL)); 1321 kern_poll(struct thread *td, struct pollfd *fds, u_int nfds, argument 1364 error = copyin(fds, bits, ni); 1406 error = pollout(td, bits, fds, nfds); 1438 * fds is still a pointer to user space. kern_poll() will 1442 return (kern_poll(td, uap->fds, uap->nfds, tsp, ssp)); 1501 pollout(td, fds, ufd 1589 struct pollfd *fds; member in struct:openbsd_poll_args [all...] |
/freebsd-10.2-release/crypto/heimdal/lib/ipc/ |
H A D | server.c | 979 struct pollfd *fds; local 985 fds = malloc(num_clients * sizeof(fds[0])); 986 if(fds == NULL) 992 fds[n].fd = clients[n]->fd; 993 fds[n].events = 0; 995 fds[n].events |= POLLIN; 997 fds[n].events |= POLLOUT; 999 fds[n].revents = 0; 1002 poll(fds, num_fd [all...] |
/freebsd-10.2-release/sbin/devd/ |
H A D | devd.cc | 954 fd_set fds; local 968 FD_ZERO(&fds); 969 FD_SET(fd, &fds); 970 rv = select(fd + 1, &fds, &fds, &fds, &tv); 989 FD_ZERO(&fds); 990 FD_SET(fd, &fds); 997 FD_SET(stream_fd, &fds); 998 FD_SET(seqpacket_fd, &fds); [all...] |
/freebsd-10.2-release/contrib/gdb/gdb/ |
H A D | nto-procfs.c | 973 int fd, fds[3]; local 992 fds[0] = STDIN_FILENO; 993 fds[1] = STDOUT_FILENO; 994 fds[2] = STDERR_FILENO; 1014 fds[0] = fd; 1022 fds[1] = fd; 1030 fds[2] = fd; 1050 pid = spawnp (argv[0], 3, fds, &inherit, argv, 1059 if (fds[0] != STDIN_FILENO) 1060 close (fds[ [all...] |
/freebsd-10.2-release/usr.sbin/moused/ |
H A D | moused.c | 1019 fd_set fds; local 1073 FD_ZERO(&fds); 1074 FD_SET(rodent.mfd, &fds); 1076 FD_SET(rodent.mremsfd, &fds); 1078 FD_SET(rodent.mremcfd, &fds); 1080 c = select(FD_SETSIZE, &fds, NULL, NULL, 1101 if ((rodent.mremsfd >= 0) && FD_ISSET(rodent.mremsfd, &fds)) { 1105 if ((rodent.mremcfd >= 0) && FD_ISSET(rodent.mremcfd, &fds)) { 1611 fd_set fds; local 1741 FD_ZERO(&fds); 2798 fd_set fds; local 2879 fd_set fds; local 2918 fd_set fds; local [all...] |
/freebsd-10.2-release/sbin/mount_fusefs/ |
H A D | mount_fusefs.c | 367 char *fds; local 372 if (asprintf(&fds, "%d", fd) == -1) 374 setenv("FUSE_DEV_FD", fds, 1); 375 free(fds);
|
/freebsd-10.2-release/tools/tools/net80211/w00t/expand/ |
H A D | expand.c | 373 fd_set fds; local 401 FD_ZERO(&fds); 402 FD_SET(p->rx, &fds); 404 if (select(p->rx+1, &fds, NULL, NULL, to) == -1) 407 if (FD_ISSET(p->rx, &fds))
|
/freebsd-10.2-release/tools/tools/net80211/w00t/redir/ |
H A D | redir.c | 572 fd_set fds; local 603 FD_ZERO(&fds); 604 FD_SET(p->rx, &fds); 605 FD_SET(p->s, &fds); 608 if (select(max+1, &fds, NULL, NULL, to) == -1) 611 if (FD_ISSET(p->rx, &fds)) 613 if (FD_ISSET(p->s, &fds))
|
/freebsd-10.2-release/contrib/ntp/include/ |
H A D | ntp_worker.h | 168 extern int pipe_socketpair(int fds[2], int *is_pipe);
|
/freebsd-10.2-release/tests/sys/fifo/ |
H A D | fifo_io.c | 867 struct pollfd fds[1]; local 869 fds[0].fd = fd; 870 fds[0].events = POLLIN | POLLOUT | POLLERR; 871 fds[0].revents = 0; 873 if (poll(fds, 1, 0) < 0) { 877 *readable = (fds[0].revents & POLLIN) ? 1 : 0; 878 *writable = (fds[0].revents & POLLOUT) ? 1 : 0; 879 *exception = (fds[0].revents & POLLERR) ? 1 : 0;
|