/src/tests/lib/libc/sys/ |
msg.h | 45 msg_open(struct msg_fds *fds) 47 if (pipe(fds->pfd) == -1) 49 if (pipe(fds->cfd) == -1) { 50 close(fds->pfd[0]); 51 close(fds->pfd[1]); 58 msg_close(struct msg_fds *fds) 60 CLOSEFD(fds->pfd[0]); 61 CLOSEFD(fds->pfd[1]); 62 CLOSEFD(fds->cfd[0]); 63 CLOSEFD(fds->cfd[1]) [all...] |
t_pollts.c | 58 int fds[2]; local in function:ATF_TC_BODY 63 ATF_REQUIRE_EQ(pipe(fds), 0); 65 pfds[0].fd = fds[0]; 67 pfds[1].fd = fds[1]; 104 ATF_REQUIRE_EQ(write(fds[1], "", 1), 1); 116 ATF_REQUIRE_EQ(close(fds[0]), 0); 117 ATF_REQUIRE_EQ(close(fds[1]), 0);
|
t_eventfd.c | 273 struct pollfd fds[1]; local in function:ATF_TC_BODY 290 fds[0].fd = efd; 291 fds[0].events = POLLIN | POLLRDNORM | POLLRDBAND | POLLPRI | 293 fds[0].revents = 0; 294 ATF_REQUIRE(poll(fds, 1, 0) == 1); 295 ATF_REQUIRE(fds[0].revents == (POLLOUT | POLLWRNORM)); 331 fds[0].fd = efd; 332 fds[0].events = POLLIN | POLLRDNORM | POLLRDBAND | POLLPRI | 334 fds[0].revents = 0; 335 ATF_REQUIRE(poll(fds, 1, 0) == 1) 372 struct pollfd fds[1]; local in function:eventfd_select_poll_kevent_block_helper [all...] |
/src/lib/libc/rpc/ |
svc_fdset.c | 92 svc_fdset_print(const char *func, size_t line, struct svc_fdset *fds, 102 fprintf(stderr, "%p[%d] fd_set<", fds->fdset, fds->fdmax); 103 for (int i = 0; i <= fds->fdmax; i++) { 104 if (!FD_ISSET(i, fds->fdset)) 111 for (int i = 0; i < fds->fdused; i++) { 112 int fd = fds->fdp[i].fd; 144 svc_fdset_sanitize(struct svc_fdset *fds) 146 while (fds->fdmax >= 0 && !FD_ISSET(fds->fdmax, fds->fdset) 161 struct svc_fdset *fds = v; local in function:svc_fdset_free 285 struct svc_fdset *fds; local in function:svc_fdset_alloc 336 struct svc_fdset *fds = svc_fdset_alloc(0); local in function:svc_fdset_zero 350 struct svc_fdset *fds = svc_fdset_alloc(fd); local in function:svc_fdset_set 369 struct svc_fdset *fds = svc_fdset_alloc(fd); local in function:svc_fdset_isset 382 struct svc_fdset *fds = svc_fdset_alloc(fd); local in function:svc_fdset_clr 413 struct svc_fdset *fds = svc_fdset_alloc(0); local in function:svc_fdset_get 426 struct svc_fdset *fds = svc_fdset_alloc(0); local in function:svc_fdset_getmax 439 struct svc_fdset *fds = svc_fdset_alloc(fd); local in function:svc_fdset_getsize 465 struct svc_fdset *fds = svc_fdset_alloc(0); local in function:svc_pollfd_get 477 struct svc_fdset *fds = svc_fdset_alloc(0); local in function:svc_pollfd_getmax 487 struct svc_fdset *fds = svc_fdset_alloc(fd); local in function:svc_pollfd_getsize [all...] |
/src/distrib/utils/sparkcrc/ |
sparkcrc.c | 84 FILE *fds; local in function:main 93 if (!(fds = fopen(argv[1], "r"))) 95 while ((len = fread(buf, 1, sizeof(buf), fds))) 99 fclose(fds);
|
/src/tests/kernel/kqueue/write/ |
t_pipe.c | 59 int fds[2]; local in function:ATF_TC_BODY 62 RL(pipe(fds)); 64 RL(close(fds[0])); 66 EV_SET(&event[0], fds[1], EVFILT_WRITE, EV_ADD|EV_ENABLE, 0, 0, 0); 83 int fds[2]; local in function:ATF_TC_BODY 88 RL(pipe(fds)); 91 EV_SET(&event[0], fds[1], EVFILT_WRITE, EV_ADD|EV_ENABLE, 0, 0, 0); 97 int sz = read(fds[0], buffer, 128); 108 RL(n = write(fds[1], "foo", 3)); 109 RL(close(fds[1])) 124 int fds[2]; local in function:ATF_TC_BODY [all...] |
/src/lib/libc/sys/ |
ppoll.c | 40 ppoll(struct pollfd * restrict fds, nfds_t nfds, 45 return pollts(fds, nfds, timeout_ts, sigmask);
|
/src/sys/external/bsd/libnv/dist/ |
msgio.h | 48 int fd_send(int sock, const int *fds, size_t nfds); 49 int fd_recv(int sock, int *fds, size_t nfds);
|
msgio.c | 122 fd_set fds; local in function:fd_wait 126 FD_ZERO(&fds); 127 FD_SET(fd, &fds); 128 (void)select(fd + 1, doread ? &fds : NULL, doread ? NULL : &fds, 256 fd_package_send(int sock, const int *fds, size_t nfds) 266 PJDLOG_ASSERT(fds != NULL); 289 if (msghdr_add_fd(cmsg, fds[i]) == -1) 305 fd_package_recv(int sock, int *fds, size_t nfds) 316 PJDLOG_ASSERT(fds != NULL) [all...] |
/src/regress/sys/kern/dislodgefd/ |
dislodgefd.c | 40 int fds[2]; variable in typeref:typename:int[2] 49 if (read(fds[0], buf, sizeof(buf)) == -1) 62 if (pipe(fds)) 65 if (socketpair(PF_LOCAL, SOCK_STREAM, 0, fds) < 0) 75 close(fds[0]);
|
/src/sys/modules/examples/pollpal/ |
cmd_pollpal.c | 76 struct pollfd fds; local in function:main 87 fds.fd = fd; 88 fds.events = POLLOUT|POLLIN; 92 ret = poll(&fds, 1, TIMEOUT); 105 if (fds.revents & (POLLERR | POLLHUP | POLLNVAL)) 108 if (fds.revents & POLLOUT) { 118 if (fds.revents & POLLIN) {
|
/src/games/sail/ |
dr_main.c | 135 int fds[2]; local in function:startdriver 138 if (pipe(fds)) { 146 close(fds[0]); 147 driver_wait_fd = fds[1]; 152 close(fds[0]); 153 close(fds[1]); 158 close(fds[1]); 159 read(fds[0], &c, 1); 160 close(fds[0]);
|
/src/tests/kernel/kqueue/read/ |
t_pipe.c | 55 int fds[2]; local in function:ATF_TC_BODY 58 RL(pipe(fds)); 61 EV_SET(&event[0], fds[0], EVFILT_READ, EV_ADD|EV_ENABLE, 0, 0, 0); 65 RL(write(fds[1], "foo", 3)); 72 RL(n = read(fds[0], buffer, event[0].data));
|
/src/usr.bin/rsh/ |
rsh.c | 339 struct pollfd fds[3], *fdp = &fds[0]; local in function:talk 395 fdp = &fds[1]; 397 fds[0].events = 0; 400 fdp = &fds[0]; 402 fds[0].events = POLLIN|POLLNVAL|POLLERR|POLLHUP; 403 fds[0].fd = 2; 407 fds[1].events = fds[2].events = POLLIN|POLLNVAL|POLLERR|POLLHUP; 408 fds[1].fd = remerr [all...] |
/src/libexec/httpd/ |
daemon-bozo.c | 152 httpd->fds = bozomalloc(httpd, httpd->nsock * sizeof(*httpd->fds)); 165 httpd->fds[i].events = POLLIN | POLLPRI | POLLRDNORM | 167 httpd->fds[i].fd = httpd->sock[i]; 214 if ((httpd->fds[idx].revents & (POLLNVAL|POLLERR|POLLHUP)) == 0) 218 httpd->fds[idx].fd, getpid(), httpd->fds[idx].revents, 229 memmove(&httpd->fds[idx], &httpd->fds[idx+1], 230 (httpd->nsock - idx) * sizeof(*httpd->fds)); [all...] |
/src/lib/libc/arch/powerpc/sys/ |
pipe.S | 17 stint %r3,0(%r5) # success, store fds
|
/src/lib/libc/arch/powerpc64/sys/ |
pipe.S | 13 stint %r3,0(%r5) # success, store fds
|
/src/lib/libc/arch/sparc/sys/ |
pipe.S | 58 st %o0, [%o2] ! success, store fds
|
/src/regress/sys/kern/latency1/ |
latency1.c | 54 int fds[2]; variable in typeref:typename:int[2] 75 if (read(fds[0], buf, sizeof(buf)) == -1) { 100 if (pipe(fds)) { 136 if (write(fds[1], buf, sizeof(buf)) == -1) {
|
/src/usr.sbin/mopd/common/ |
loop-linux2.c | 98 fd_set fds, listeners; local in function:Loop 118 FD_ZERO(&fds); 121 FD_SET(ii->fd, &fds); 127 listeners = fds;
|
/src/libexec/rexecd/ |
rexecd.c | 146 struct pollfd fds[2]; local in function:doit 283 fds[0].fd = s; 284 fds[1].fd = pv[0]; 285 fds[0].events = fds[1].events = POLLIN; 290 if (poll(fds, 2, 0) < 0) { 295 if (fds[0].revents & POLLIN) { 297 fds[0].events = 0; 301 if (fds[1].revents & POLLIN) { 305 fds[1].events = 0 [all...] |
/src/lib/libc/arch/or1k/sys/ |
pipe.S | 18 l.sw 0(r5),r11 # success, store fds
|
/src/regress/sys/kern/select/ |
select.c | 53 int fds[NPIPE][2]; variable in typeref:typename:int[][2] 67 fd = fds[i][1]; 96 fd = fds[i][0]; 189 if (pipe(fds[i])) { 193 if (fcntl(fds[i][0], F_SETFL, O_NONBLOCK) == -1) {
|
/src/sys/kern/ |
sys_select.c | 236 sel_do_scan(const char *opname, void *fds, const int nf, const size_t ni, 264 l->l_selbits = fds; 293 error = selscan((char *)fds, nf, ni, retval); 295 error = pollscan((struct pollfd *)fds, nf, retval); 395 * Don't allow absurdly large numbers of fds to be selected. 400 * include all the possible fds, as fd_sets are always 404 * set lower after some fds were opened, we always allow selecting 433 nd -= fb * NFDBITS; /* the number of excess fds */ 435 #define checkbits(name, o, sz, fds) \ 442 if (anyset(bits, (fds) ? 630 struct pollfd *fds; local in function:pollcommon 829 fd_mask *fds = (fd_mask *)l->l_selbits; local in function:sel_setevents [all...] |
/src/usr.sbin/altq/altqd/ |
altqd.c | 118 fd_set fds, rfds; local in function:main 216 FD_ZERO(&fds); 226 FD_SET(fd, &fds); 230 FD_SET(qpsock, &fds); 251 FD_COPY(&fds, &rfds); 282 FD_SET(newsock, &fds); 305 FD_CLR(fd1, &fds);
|