fds 223 arch/um/drivers/chan_user.c int fds[2], n, err; fds 226 arch/um/drivers/chan_user.c err = os_pipe(fds, 1, 1); fds 234 arch/um/drivers/chan_user.c .pipe_fd = fds[1] } ); fds 248 arch/um/drivers/chan_user.c *fd_out = fds[0]; fds 249 arch/um/drivers/chan_user.c n = read(fds[0], &c, sizeof(c)); fds 268 arch/um/drivers/chan_user.c close(fds[1]); fds 269 arch/um/drivers/chan_user.c close(fds[0]); fds 182 arch/um/drivers/net_user.c int pid, fds[2], err; fds 185 arch/um/drivers/net_user.c err = os_pipe(fds, 1, 0); fds 191 arch/um/drivers/net_user.c pe_data.close_me = fds[0]; fds 192 arch/um/drivers/net_user.c pe_data.stdout_fd = fds[1]; fds 196 arch/um/drivers/net_user.c read_output(fds[0], output, output_len); fds 198 arch/um/drivers/net_user.c close(fds[0]); fds 199 arch/um/drivers/net_user.c close(fds[1]); fds 78 arch/um/drivers/slip_user.c int pid, fds[2], err, output_len; fds 80 arch/um/drivers/slip_user.c err = os_pipe(fds, 1, 0); fds 89 arch/um/drivers/slip_user.c pe_data.stdout_fd = fds[1]; fds 90 arch/um/drivers/slip_user.c pe_data.close_me = fds[0]; fds 106 arch/um/drivers/slip_user.c close(fds[1]); fds 107 arch/um/drivers/slip_user.c read_output(fds[0], output, output_len); fds 111 arch/um/drivers/slip_user.c close(fds[0]); fds 117 arch/um/drivers/slip_user.c close(fds[0]); fds 118 arch/um/drivers/slip_user.c close(fds[1]); fds 52 arch/um/drivers/slirp_user.c int fds[2], pid, err; fds 54 arch/um/drivers/slirp_user.c err = os_pipe(fds, 1, 1); fds 58 arch/um/drivers/slirp_user.c err = slirp_tramp(pri->argw.argv, fds[1]); fds 65 arch/um/drivers/slirp_user.c pri->slave = fds[1]; fds 70 arch/um/drivers/slirp_user.c return fds[0]; fds 72 arch/um/drivers/slirp_user.c close(fds[0]); fds 73 arch/um/drivers/slirp_user.c close(fds[1]); fds 52 arch/um/drivers/ubd_kern.c int fds[2]; fds 1325 arch/um/drivers/ubd_kern.c io_req->fds[0] = dev->cow.fd; fds 1327 arch/um/drivers/ubd_kern.c io_req->fds[0] = dev->fd; fds 1339 arch/um/drivers/ubd_kern.c io_req->fds[1] = dev->fd; fds 1492 arch/um/drivers/ubd_kern.c n = os_pwrite_file(req->fds[1], &req->bitmap_words, fds 1511 arch/um/drivers/ubd_kern.c req->error = map_error(-os_sync_file(req->fds[0])); fds 1537 arch/um/drivers/ubd_kern.c n = os_pread_file(req->fds[bit], buf, len, off); fds 1546 arch/um/drivers/ubd_kern.c n = os_pwrite_file(req->fds[bit], buf, len, off); fds 1554 arch/um/drivers/ubd_kern.c n = os_falloc_punch(req->fds[bit], off, len); fds 30 arch/um/drivers/ubd_user.c int pid, fds[2], err; fds 32 arch/um/drivers/ubd_user.c err = os_pipe(fds, 1, 1); fds 38 arch/um/drivers/ubd_user.c kernel_fd = fds[0]; fds 41 arch/um/drivers/ubd_user.c *fd_out = fds[1]; fds 60 arch/um/drivers/ubd_user.c os_close_file(fds[0]); fds 61 arch/um/drivers/ubd_user.c os_close_file(fds[1]); fds 337 arch/um/drivers/vector_kern.c mmsg_vector->msg_hdr.msg_name = vp->fds->remote_addr; fds 338 arch/um/drivers/vector_kern.c mmsg_vector->msg_hdr.msg_namelen = vp->fds->remote_addr_size; fds 405 arch/um/drivers/vector_kern.c vp->fds->tx_fd, fds 782 arch/um/drivers/vector_kern.c if (vp->fds != NULL) fds 849 arch/um/drivers/vector_kern.c pkt_len = uml_vector_recvmsg(vp->fds->rx_fd, &hdr, 0); fds 902 arch/um/drivers/vector_kern.c vp->fds->tx_fd, fds 952 arch/um/drivers/vector_kern.c vp->fds->rx_fd, qi->mmsg_vector, qi->max_depth, 0); fds 1046 arch/um/drivers/vector_kern.c deactivate_fd(vp->fds->rx_fd, vp->rx_irq); fds 1047 arch/um/drivers/vector_kern.c if ((vp->fds->rx_fd != vp->fds->tx_fd) && (vp->tx_irq != 0)) fds 1048 arch/um/drivers/vector_kern.c deactivate_fd(vp->fds->tx_fd, vp->tx_irq); fds 1128 arch/um/drivers/vector_kern.c if (vp->fds == NULL) fds 1141 arch/um/drivers/vector_kern.c if (vp->fds->rx_fd > 0) { fds 1142 arch/um/drivers/vector_kern.c os_close_file(vp->fds->rx_fd); fds 1143 arch/um/drivers/vector_kern.c vp->fds->rx_fd = -1; fds 1145 arch/um/drivers/vector_kern.c if (vp->fds->tx_fd > 0) { fds 1146 arch/um/drivers/vector_kern.c os_close_file(vp->fds->tx_fd); fds 1147 arch/um/drivers/vector_kern.c vp->fds->tx_fd = -1; fds 1150 arch/um/drivers/vector_kern.c kfree(vp->fds->remote_addr); fds 1158 arch/um/drivers/vector_kern.c kfree(vp->fds); fds 1159 arch/um/drivers/vector_kern.c vp->fds = NULL; fds 1199 arch/um/drivers/vector_kern.c vp->fds = uml_vector_user_open(vp->unit, vp->parsed); fds 1201 arch/um/drivers/vector_kern.c if (vp->fds == NULL) fds 1238 arch/um/drivers/vector_kern.c irq_rr + VECTOR_BASE_IRQ, vp->fds->rx_fd, fds 1253 arch/um/drivers/vector_kern.c irq_rr + VECTOR_BASE_IRQ, vp->fds->tx_fd, fds 1267 arch/um/drivers/vector_kern.c if (!uml_raw_enable_qdisc_bypass(vp->fds->rx_fd)) fds 1271 arch/um/drivers/vector_kern.c vp->bpf = uml_vector_default_bpf(vp->fds->rx_fd, dev->dev_addr); fds 81 arch/um/drivers/vector_kern.h struct vector_fds *fds; fds 402 arch/um/drivers/vector_transports.c if (uml_raw_enable_vnet_headers(vp->fds->rx_fd)) { fds 403 arch/um/drivers/vector_transports.c if (!uml_raw_enable_vnet_headers(vp->fds->tx_fd)) fds 423 arch/um/drivers/vector_transports.c if (uml_raw_enable_vnet_headers(vp->fds->rx_fd)) { fds 440 arch/um/drivers/vector_transports.c if (uml_tap_enable_vnet_headers(vp->fds->tx_fd)) fds 448 arch/um/drivers/vector_transports.c if (uml_tap_enable_vnet_headers(vp->fds->tx_fd)) { fds 67 arch/um/drivers/virtio_uml.c const int *fds, unsigned int fds_num) fds 72 arch/um/drivers/virtio_uml.c rc = os_sendmsg_fds(fd, buf, len, fds, fds_num); fds 76 arch/um/drivers/virtio_uml.c fds = NULL; fds 172 arch/um/drivers/virtio_uml.c int *fds, size_t num_fds) fds 193 arch/um/drivers/virtio_uml.c rc = full_sendmsg_fds(vu_dev->sock, msg, size, fds, num_fds); fds 519 arch/um/drivers/virtio_uml.c int fds[2]; fds 558 arch/um/drivers/virtio_uml.c &fds[0], fds 566 arch/um/drivers/virtio_uml.c &fds[1], &msg.payload.mem_regions.regions[1]); fds 571 arch/um/drivers/virtio_uml.c return vhost_user_send(vu_dev, false, &msg, fds, fds 183 arch/um/include/shared/os.h const int *fds, unsigned int fds_num); fds 133 arch/um/os-Linux/drivers/tuntap_user.c int err, fds[2], len, used; fds 159 arch/um/os-Linux/drivers/tuntap_user.c err = socketpair(AF_UNIX, SOCK_DGRAM, 0, fds); fds 172 arch/um/os-Linux/drivers/tuntap_user.c err = tuntap_open_tramp(pri->gate_addr, &pri->fd, fds[0], fds 173 arch/um/os-Linux/drivers/tuntap_user.c fds[1], buffer, len, &used); fds 189 arch/um/os-Linux/drivers/tuntap_user.c close(fds[0]); fds 372 arch/um/os-Linux/file.c int os_pipe(int *fds, int stream, int close_on_exec) fds 376 arch/um/os-Linux/file.c err = socketpair(AF_UNIX, type, 0, fds); fds 383 arch/um/os-Linux/file.c err = os_set_exec_close(fds[0]); fds 387 arch/um/os-Linux/file.c err = os_set_exec_close(fds[1]); fds 396 arch/um/os-Linux/file.c close(fds[1]); fds 397 arch/um/os-Linux/file.c close(fds[0]); fds 634 arch/um/os-Linux/file.c int os_sendmsg_fds(int fd, const void *buf, unsigned int len, const int *fds, fds 642 arch/um/os-Linux/file.c char control[CMSG_SPACE(sizeof(*fds) * OS_SENDMSG_MAX_FDS)]; fds 645 arch/um/os-Linux/file.c unsigned int fds_size = sizeof(*fds) * fds_num; fds 661 arch/um/os-Linux/file.c memcpy(CMSG_DATA(cmsg), fds, fds_size); fds 46 arch/um/os-Linux/helper.c int pid, fds[2], ret, n; fds 52 arch/um/os-Linux/helper.c ret = socketpair(AF_UNIX, SOCK_STREAM, 0, fds); fds 60 arch/um/os-Linux/helper.c ret = os_set_exec_close(fds[1]); fds 71 arch/um/os-Linux/helper.c data.fd = fds[1]; fds 82 arch/um/os-Linux/helper.c close(fds[1]); fds 83 arch/um/os-Linux/helper.c fds[1] = -1; fds 89 arch/um/os-Linux/helper.c n = read(fds[0], &ret, sizeof(ret)); fds 105 arch/um/os-Linux/helper.c if (fds[1] != -1) fds 106 arch/um/os-Linux/helper.c close(fds[1]); fds 107 arch/um/os-Linux/helper.c close(fds[0]); fds 53 arch/um/os-Linux/sigio.c struct pollfds *fds, tmp; fds 59 arch/um/os-Linux/sigio.c fds = ¤t_poll; fds 61 arch/um/os-Linux/sigio.c n = poll(fds->poll, fds->used, -1); fds 68 arch/um/os-Linux/sigio.c for (i = 0; i < fds->used; i++) { fds 69 arch/um/os-Linux/sigio.c p = &fds->poll[i]; fds 87 arch/um/os-Linux/sigio.c fds->used--; fds 88 arch/um/os-Linux/sigio.c memmove(&fds->poll[i], &fds->poll[i + 1], fds 89 arch/um/os-Linux/sigio.c (fds->used - i) * sizeof(*fds->poll)); fds 102 drivers/staging/greybus/tools/loopback_test.c struct pollfd fds[MAX_NUM_DEVICES]; fds 653 drivers/staging/greybus/tools/loopback_test.c t->fds[fds_idx].fd = open(buf, O_RDONLY); fds 654 drivers/staging/greybus/tools/loopback_test.c if (t->fds[fds_idx].fd < 0) { fds 658 drivers/staging/greybus/tools/loopback_test.c read(t->fds[fds_idx].fd, &dummy, 1); fds 659 drivers/staging/greybus/tools/loopback_test.c t->fds[fds_idx].events = POLLERR | POLLPRI; fds 660 drivers/staging/greybus/tools/loopback_test.c t->fds[fds_idx].revents = 0; fds 670 drivers/staging/greybus/tools/loopback_test.c close(t->fds[i].fd); fds 679 drivers/staging/greybus/tools/loopback_test.c close(t->fds[i].fd); fds 744 drivers/staging/greybus/tools/loopback_test.c ret = ppoll(t->fds, t->poll_count, ts, &mask_old); fds 752 drivers/staging/greybus/tools/loopback_test.c if (t->fds[i].revents & POLLPRI) { fds 754 drivers/staging/greybus/tools/loopback_test.c read(t->fds[i].fd, &dummy, 1); fds 355 drivers/vfio/pci/vfio_pci_intrs.c unsigned count, int32_t *fds, bool msix) fds 363 drivers/vfio/pci/vfio_pci_intrs.c int fd = fds ? fds[i] : -1; fds 510 drivers/vfio/pci/vfio_pci_intrs.c int32_t *fds = data; fds 515 drivers/vfio/pci/vfio_pci_intrs.c fds, msix); fds 521 drivers/vfio/pci/vfio_pci_intrs.c ret = vfio_msi_set_block(vdev, start, count, fds, msix); fds 3179 fs/io_uring.c __s32 __user *fds = (__s32 __user *) arg; fds 3196 fs/io_uring.c if (copy_from_user(&fd, &fds[i], sizeof(fd))) fds 3590 fs/io_uring.c __s32 __user *fds = arg; fds 3596 fs/io_uring.c if (copy_from_user(&fd, fds, sizeof(*fds))) fds 247 fs/jffs2/nodelist.h struct jffs2_full_dirent *fds; fds 685 fs/jffs2/readinode.c jffs2_add_fd_to_list(c, fd, &rii->fds); fds 1123 fs/jffs2/readinode.c jffs2_free_full_dirent_list(rii->fds); fds 1124 fs/jffs2/readinode.c rii->fds = NULL; fds 1179 fs/jffs2/readinode.c f->dents = rii.fds; fds 1187 fs/jffs2/readinode.c if (!rii.fds) { fds 1399 fs/jffs2/readinode.c struct jffs2_full_dirent *fd, *fds; fds 1417 fs/jffs2/readinode.c fds = f->dents; fds 1418 fs/jffs2/readinode.c while(fds) { fds 1419 fs/jffs2/readinode.c fd = fds; fds 1420 fs/jffs2/readinode.c fds = fd->next; fds 413 fs/select.c #define FDS_IN(fds, n) (fds->in + n) fds 414 fs/select.c #define FDS_OUT(fds, n) (fds->out + n) fds 415 fs/select.c #define FDS_EX(fds, n) (fds->ex + n) fds 417 fs/select.c #define BITS(fds, n) (*FDS_IN(fds, n)|*FDS_OUT(fds, n)|*FDS_EX(fds, n)) fds 419 fs/select.c static int max_select_fd(unsigned long n, fd_set_bits *fds) fds 433 fs/select.c set &= BITS(fds, n); fds 443 fs/select.c set = BITS(fds, n); fds 476 fs/select.c static int do_select(int n, fd_set_bits *fds, struct timespec64 *end_time) fds 487 fs/select.c retval = max_select_fd(n, fds); fds 509 fs/select.c inp = fds->in; outp = fds->out; exp = fds->ex; fds 510 fs/select.c rinp = fds->res_in; routp = fds->res_out; rexp = fds->res_ex; fds 624 fs/select.c fd_set_bits fds; fds 662 fs/select.c fds.in = bits; fds 663 fs/select.c fds.out = bits + size; fds 664 fs/select.c fds.ex = bits + 2*size; fds 665 fs/select.c fds.res_in = bits + 3*size; fds 666 fs/select.c fds.res_out = bits + 4*size; fds 667 fs/select.c fds.res_ex = bits + 5*size; fds 669 fs/select.c if ((ret = get_fd_set(n, inp, fds.in)) || fds 670 fs/select.c (ret = get_fd_set(n, outp, fds.out)) || fds 671 fs/select.c (ret = get_fd_set(n, exp, fds.ex))) fds 673 fs/select.c zero_fd_set(n, fds.res_in); fds 674 fs/select.c zero_fd_set(n, fds.res_out); fds 675 fs/select.c zero_fd_set(n, fds.res_ex); fds 677 fs/select.c ret = do_select(n, &fds, end_time); fds 688 fs/select.c if (set_fd_set(n, inp, fds.res_in) || fds 689 fs/select.c set_fd_set(n, outp, fds.res_out) || fds 690 fs/select.c set_fd_set(n, exp, fds.res_ex)) fds 1005 fs/select.c struct pollfd *fds = walk->entries; fds 1009 fs/select.c if (__put_user(fds[j].revents, &ufds->revents)) fds 1178 fs/select.c fd_set_bits fds; fds 1208 fs/select.c fds.in = (unsigned long *) bits; fds 1209 fs/select.c fds.out = (unsigned long *) (bits + size); fds 1210 fs/select.c fds.ex = (unsigned long *) (bits + 2*size); fds 1211 fs/select.c fds.res_in = (unsigned long *) (bits + 3*size); fds 1212 fs/select.c fds.res_out = (unsigned long *) (bits + 4*size); fds 1213 fs/select.c fds.res_ex = (unsigned long *) (bits + 5*size); fds 1215 fs/select.c if ((ret = compat_get_fd_set(n, inp, fds.in)) || fds 1216 fs/select.c (ret = compat_get_fd_set(n, outp, fds.out)) || fds 1217 fs/select.c (ret = compat_get_fd_set(n, exp, fds.ex))) fds 1219 fs/select.c zero_fd_set(n, fds.res_in); fds 1220 fs/select.c zero_fd_set(n, fds.res_out); fds 1221 fs/select.c zero_fd_set(n, fds.res_ex); fds 1223 fs/select.c ret = do_select(n, &fds, end_time); fds 1234 fs/select.c if (compat_set_fd_set(n, inp, fds.res_in) || fds 1235 fs/select.c compat_set_fd_set(n, outp, fds.res_out) || fds 1236 fs/select.c compat_set_fd_set(n, exp, fds.res_ex)) fds 195 kernel/audit.h int fds[2]; fds 1512 kernel/auditsc.c if (context->fds[0] >= 0) { fds 1516 kernel/auditsc.c context->fds[0], context->fds[1]); fds 1729 kernel/auditsc.c context->fds[0] = -1; fds 2340 kernel/auditsc.c context->fds[0] = fd1; fds 2341 kernel/auditsc.c context->fds[1] = fd2; fds 487 samples/bpf/xdpsock_user.c struct pollfd *fds) fds 514 samples/bpf/xdpsock_user.c ret = poll(fds, num_socks, opt_timeout); fds 548 samples/bpf/xdpsock_user.c static void rx_drop(struct xsk_socket_info *xsk, struct pollfd *fds) fds 557 samples/bpf/xdpsock_user.c ret = poll(fds, num_socks, opt_timeout); fds 566 samples/bpf/xdpsock_user.c ret = poll(fds, num_socks, opt_timeout); fds 589 samples/bpf/xdpsock_user.c struct pollfd fds[MAX_SOCKS + 1]; fds 592 samples/bpf/xdpsock_user.c memset(fds, 0, sizeof(fds)); fds 595 samples/bpf/xdpsock_user.c fds[i].fd = xsk_socket__fd(xsks[i]->xsk); fds 596 samples/bpf/xdpsock_user.c fds[i].events = POLLIN; fds 601 samples/bpf/xdpsock_user.c ret = poll(fds, num_socks, opt_timeout); fds 607 samples/bpf/xdpsock_user.c rx_drop(xsks[i], fds); fds 636 samples/bpf/xdpsock_user.c struct pollfd fds[MAX_SOCKS]; fds 640 samples/bpf/xdpsock_user.c memset(fds, 0, sizeof(fds)); fds 642 samples/bpf/xdpsock_user.c fds[0].fd = xsk_socket__fd(xsks[i]->xsk); fds 643 samples/bpf/xdpsock_user.c fds[0].events = POLLOUT; fds 648 samples/bpf/xdpsock_user.c ret = poll(fds, num_socks, opt_timeout); fds 652 samples/bpf/xdpsock_user.c if (!(fds[0].revents & POLLOUT)) fds 661 samples/bpf/xdpsock_user.c static void l2fwd(struct xsk_socket_info *xsk, struct pollfd *fds) fds 667 samples/bpf/xdpsock_user.c complete_tx_l2fwd(xsk, fds); fds 672 samples/bpf/xdpsock_user.c ret = poll(fds, num_socks, opt_timeout); fds 709 samples/bpf/xdpsock_user.c struct pollfd fds[MAX_SOCKS]; fds 712 samples/bpf/xdpsock_user.c memset(fds, 0, sizeof(fds)); fds 715 samples/bpf/xdpsock_user.c fds[i].fd = xsk_socket__fd(xsks[i]->xsk); fds 716 samples/bpf/xdpsock_user.c fds[i].events = POLLOUT | POLLIN; fds 721 samples/bpf/xdpsock_user.c ret = poll(fds, num_socks, opt_timeout); fds 727 samples/bpf/xdpsock_user.c l2fwd(xsks[i], fds); fds 1625 tools/include/nolibc/nolibc.h int sys_poll(struct pollfd *fds, int nfds, int timeout) fds 1627 tools/include/nolibc/nolibc.h return my_syscall3(__NR_poll, fds, nfds, timeout); fds 2062 tools/include/nolibc/nolibc.h int poll(struct pollfd *fds, int nfds, int timeout) fds 2064 tools/include/nolibc/nolibc.h int ret = sys_poll(fds, nfds, timeout); fds 86 tools/io_uring/io_uring-bench.c __s32 *fds; fds 123 tools/io_uring/io_uring-bench.c s->fds = calloc(s->nr_files, sizeof(__s32)); fds 125 tools/io_uring/io_uring-bench.c s->fds[i] = s->files[i].real_fd; fds 129 tools/io_uring/io_uring-bench.c return io_uring_register(s->ring_fd, IORING_REGISTER_FILES, s->fds, fds 181 tools/lib/bpf/libbpf.c int *fds; fds 311 tools/lib/bpf/libbpf.c zclose(prog->instances.fds[i]); fds 318 tools/lib/bpf/libbpf.c zfree(&prog->instances.fds); fds 395 tools/lib/bpf/libbpf.c prog->instances.fds = NULL; fds 3464 tools/lib/bpf/libbpf.c if (prog->instances.nr < 0 || !prog->instances.fds) { fds 3471 tools/lib/bpf/libbpf.c prog->instances.fds = malloc(sizeof(int)); fds 3472 tools/lib/bpf/libbpf.c if (!prog->instances.fds) { fds 3477 tools/lib/bpf/libbpf.c prog->instances.fds[0] = -1; fds 3488 tools/lib/bpf/libbpf.c prog->instances.fds[0] = fd; fds 3508 tools/lib/bpf/libbpf.c prog->instances.fds[i] = -1; fds 3526 tools/lib/bpf/libbpf.c prog->instances.fds[i] = fd; fds 3792 tools/lib/bpf/libbpf.c if (bpf_obj_pin(prog->instances.fds[instance], path)) { fds 4381 tools/lib/bpf/libbpf.c if (prog->instances.nr > 0 || prog->instances.fds) { fds 4396 tools/lib/bpf/libbpf.c prog->instances.fds = instances_fds; fds 4414 tools/lib/bpf/libbpf.c fd = prog->instances.fds[n]; fds 53 tools/perf/bench/sched-messaging.c static void fdpair(int fds[2]) fds 56 tools/perf/bench/sched-messaging.c if (pipe(fds) == 0) fds 59 tools/perf/bench/sched-messaging.c if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds) == 0) fds 205 tools/perf/bench/sched-messaging.c int fds[2]; fds 213 tools/perf/bench/sched-messaging.c fdpair(fds); fds 216 tools/perf/bench/sched-messaging.c ctx->in_fds[0] = fds[0]; fds 217 tools/perf/bench/sched-messaging.c ctx->in_fds[1] = fds[1]; fds 223 tools/perf/bench/sched-messaging.c snd_ctx->out_fds[i] = fds[1]; fds 225 tools/perf/bench/sched-messaging.c close(fds[0]); fds 42 tools/perf/tests/bpf.c int fds[2], i; fds 44 tools/perf/tests/bpf.c fds[0] = open("/dev/null", O_RDONLY); fds 45 tools/perf/tests/bpf.c fds[1] = open("/dev/null", O_RDWR); fds 47 tools/perf/tests/bpf.c if (fds[0] < 0 || fds[1] < 0) fds 51 tools/perf/tests/bpf.c lseek(fds[i % 2], i, (i / 2) % 2 ? SEEK_CUR : SEEK_SET); fds 52 tools/perf/tests/bpf.c lseek(fds[(i + 1) % 2], i, (i / 2) % 2 ? SEEK_CUR : SEEK_SET); fds 54 tools/perf/tests/bpf.c close(fds[0]); fds 55 tools/perf/tests/bpf.c close(fds[1]); fds 203 tools/testing/selftests/bpf/test_sockmap.c int *fds[4] = {&s1, &s2, &c1, &c2}; fds 209 tools/testing/selftests/bpf/test_sockmap.c *fds[i] = socket(AF_INET, SOCK_STREAM, 0); fds 210 tools/testing/selftests/bpf/test_sockmap.c if (*fds[i] < 0) { fds 218 tools/testing/selftests/bpf/test_sockmap.c err = setsockopt(*fds[i], SOL_SOCKET, SO_REUSEADDR, fds 228 tools/testing/selftests/bpf/test_sockmap.c err = ioctl(*fds[i], FIONBIO, (char *)&one); fds 88 tools/testing/selftests/cgroup/test_freezer.c struct pollfd fds = { fds 94 tools/testing/selftests/cgroup/test_freezer.c ret = poll(&fds, 1, 10000); fds 103 tools/testing/selftests/cgroup/test_freezer.c if (ret > 0 && fds.revents & POLLIN) { fds 221 tools/testing/selftests/net/psock_fanout.c static int sock_fanout_read(int fds[], char *rings[], const int expect[]) fds 225 tools/testing/selftests/net/psock_fanout.c ret[0] = sock_fanout_read_ring(fds[0], rings[0]); fds 226 tools/testing/selftests/net/psock_fanout.c ret[1] = sock_fanout_read_ring(fds[1], rings[1]); fds 255 tools/testing/selftests/net/psock_fanout.c int fds[2]; fds 259 tools/testing/selftests/net/psock_fanout.c fds[0] = sock_fanout_open(PACKET_FANOUT_HASH, 0); fds 260 tools/testing/selftests/net/psock_fanout.c if (fds[0] == -1) { fds 278 tools/testing/selftests/net/psock_fanout.c fds[1] = sock_fanout_open(PACKET_FANOUT_HASH, 0); fds 279 tools/testing/selftests/net/psock_fanout.c if (fds[1] == -1) { fds 283 tools/testing/selftests/net/psock_fanout.c if (close(fds[1]) || close(fds[0])) { fds 292 tools/testing/selftests/net/psock_fanout.c int fds[3]; fds 297 tools/testing/selftests/net/psock_fanout.c fds[0] = sock_fanout_open(PACKET_FANOUT_HASH | fds 299 tools/testing/selftests/net/psock_fanout.c if (fds[0] == -1) { fds 304 tools/testing/selftests/net/psock_fanout.c sock_fanout_getopts(fds[0], &typeflags, &first_group_id); fds 315 tools/testing/selftests/net/psock_fanout.c fds[1] = sock_fanout_open(PACKET_FANOUT_HASH, first_group_id); fds 316 tools/testing/selftests/net/psock_fanout.c if (fds[1] == -1) { fds 322 tools/testing/selftests/net/psock_fanout.c fds[2] = sock_fanout_open(PACKET_FANOUT_HASH | fds 324 tools/testing/selftests/net/psock_fanout.c if (fds[2] == -1) { fds 330 tools/testing/selftests/net/psock_fanout.c sock_fanout_getopts(fds[2], &typeflags, &second_group_id); fds 338 tools/testing/selftests/net/psock_fanout.c if (close(fds[0]) || close(fds[1]) || close(fds[2])) { fds 350 tools/testing/selftests/net/psock_fanout.c int fds[2], fds_udp[2][2], ret; fds 355 tools/testing/selftests/net/psock_fanout.c fds[0] = sock_fanout_open(typeflags, 0); fds 356 tools/testing/selftests/net/psock_fanout.c fds[1] = sock_fanout_open(typeflags, 0); fds 357 tools/testing/selftests/net/psock_fanout.c if (fds[0] == -1 || fds[1] == -1) { fds 362 tools/testing/selftests/net/psock_fanout.c sock_fanout_set_cbpf(fds[0]); fds 364 tools/testing/selftests/net/psock_fanout.c sock_fanout_set_ebpf(fds[0]); fds 366 tools/testing/selftests/net/psock_fanout.c rings[0] = sock_fanout_open_ring(fds[0]); fds 367 tools/testing/selftests/net/psock_fanout.c rings[1] = sock_fanout_open_ring(fds[1]); fds 370 tools/testing/selftests/net/psock_fanout.c sock_fanout_read(fds, rings, expect0); fds 375 tools/testing/selftests/net/psock_fanout.c ret = sock_fanout_read(fds, rings, expect1); fds 380 tools/testing/selftests/net/psock_fanout.c ret |= sock_fanout_read(fds, rings, expect2); fds 389 tools/testing/selftests/net/psock_fanout.c close(fds[1]) || close(fds[0])) { fds 75 tools/testing/selftests/net/psock_lib.h static __maybe_unused void pair_udp_open(int fds[], uint16_t port) fds 79 tools/testing/selftests/net/psock_lib.h fds[0] = socket(PF_INET, SOCK_DGRAM, 0); fds 80 tools/testing/selftests/net/psock_lib.h fds[1] = socket(PF_INET, SOCK_DGRAM, 0); fds 81 tools/testing/selftests/net/psock_lib.h if (fds[0] == -1 || fds[1] == -1) { fds 97 tools/testing/selftests/net/psock_lib.h if (bind(fds[1], (void *) &daddr, sizeof(daddr))) { fds 101 tools/testing/selftests/net/psock_lib.h if (bind(fds[0], (void *) &saddr, sizeof(saddr))) { fds 105 tools/testing/selftests/net/psock_lib.h if (connect(fds[0], (void *) &daddr, sizeof(daddr))) { fds 111 tools/testing/selftests/net/psock_lib.h static __maybe_unused void pair_udp_send_char(int fds[], int num, char payload) fds 118 tools/testing/selftests/net/psock_lib.h if (write(fds[0], buf, sizeof(buf)) != sizeof(buf)) { fds 122 tools/testing/selftests/net/psock_lib.h if (read(fds[1], rbuf, sizeof(rbuf)) != sizeof(rbuf)) { fds 133 tools/testing/selftests/net/psock_lib.h static __maybe_unused void pair_udp_send(int fds[], int num) fds 135 tools/testing/selftests/net/psock_lib.h return pair_udp_send_char(fds, num, DATA_CHAR); fds 138 tools/testing/selftests/net/psock_lib.h static __maybe_unused void pair_udp_close(int fds[]) fds 140 tools/testing/selftests/net/psock_lib.h close(fds[0]); fds 141 tools/testing/selftests/net/psock_lib.h close(fds[1]); fds 364 tools/testing/selftests/net/psock_snd.c int fdr, fds, total_len; fds 367 tools/testing/selftests/net/psock_snd.c fds = setup_sniffer(); fds 373 tools/testing/selftests/net/psock_snd.c do_rx(fds, total_len - sizeof(struct virtio_net_hdr), fds 378 tools/testing/selftests/net/psock_snd.c if (close(fds)) fds 241 tools/testing/selftests/net/udpgso_bench_tx.c struct pollfd fds = {0}; fds 244 tools/testing/selftests/net/udpgso_bench_tx.c fds.fd = fd; fds 245 tools/testing/selftests/net/udpgso_bench_tx.c ret = poll(&fds, 1, 500); fds 29 tools/testing/selftests/pidfd/pidfd_poll_test.c struct pollfd fds; fds 33 tools/testing/selftests/pidfd/pidfd_poll_test.c fds.events = POLLIN; fds 86 tools/testing/selftests/pidfd/pidfd_poll_test.c fds.fd = pidfd; fds 87 tools/testing/selftests/pidfd/pidfd_poll_test.c nevents = poll(&fds, 1, -1); fds 98 tools/testing/selftests/pidfd/pidfd_poll_test.c if (!(fds.revents & POLLIN)) fds 101 tools/testing/selftests/pidfd/pidfd_poll_test.c fds.revents); fds 52 tools/testing/selftests/powerpc/pmu/ebb/cpu_event_pinned_vs_ebb_test.c FAIL_IF(pipe(read_pipe.fds) == -1); fds 53 tools/testing/selftests/powerpc/pmu/ebb/cpu_event_pinned_vs_ebb_test.c FAIL_IF(pipe(write_pipe.fds) == -1); fds 50 tools/testing/selftests/powerpc/pmu/ebb/cpu_event_vs_ebb_test.c FAIL_IF(pipe(read_pipe.fds) == -1); fds 51 tools/testing/selftests/powerpc/pmu/ebb/cpu_event_vs_ebb_test.c FAIL_IF(pipe(write_pipe.fds) == -1); fds 52 tools/testing/selftests/powerpc/pmu/ebb/ebb_on_child_test.c FAIL_IF(pipe(read_pipe.fds) == -1); fds 53 tools/testing/selftests/powerpc/pmu/ebb/ebb_on_child_test.c FAIL_IF(pipe(write_pipe.fds) == -1); fds 59 tools/testing/selftests/powerpc/pmu/ebb/ebb_on_willing_child_test.c FAIL_IF(pipe(read_pipe.fds) == -1); fds 60 tools/testing/selftests/powerpc/pmu/ebb/ebb_on_willing_child_test.c FAIL_IF(pipe(write_pipe.fds) == -1); fds 50 tools/testing/selftests/powerpc/pmu/ebb/ebb_vs_cpu_event_test.c FAIL_IF(pipe(read_pipe.fds) == -1); fds 51 tools/testing/selftests/powerpc/pmu/ebb/ebb_vs_cpu_event_test.c FAIL_IF(pipe(write_pipe.fds) == -1); fds 47 tools/testing/selftests/powerpc/pmu/ebb/task_event_pinned_vs_ebb_test.c FAIL_IF(pipe(read_pipe.fds) == -1); fds 48 tools/testing/selftests/powerpc/pmu/ebb/task_event_pinned_vs_ebb_test.c FAIL_IF(pipe(write_pipe.fds) == -1); fds 45 tools/testing/selftests/powerpc/pmu/ebb/task_event_vs_ebb_test.c FAIL_IF(pipe(read_pipe.fds) == -1); fds 46 tools/testing/selftests/powerpc/pmu/ebb/task_event_vs_ebb_test.c FAIL_IF(pipe(write_pipe.fds) == -1); fds 126 tools/testing/selftests/powerpc/pmu/lib.c if (pipe(read_pipe.fds) == -1) fds 129 tools/testing/selftests/powerpc/pmu/lib.c if (pipe(write_pipe.fds) == -1) fds 19 tools/testing/selftests/powerpc/pmu/lib.h int fds[2]; fds 60 tools/testing/selftests/sync/sync.c struct pollfd fds; fds 62 tools/testing/selftests/sync/sync.c fds.fd = fd; fds 63 tools/testing/selftests/sync/sync.c fds.events = POLLIN | POLLERR; fds 65 tools/testing/selftests/sync/sync.c return poll(&fds, 1, timeout); fds 497 tools/usb/usbip/src/usbipd.c struct pollfd *fds; fds 546 tools/usb/usbip/src/usbipd.c fds = calloc(nsockfd, sizeof(struct pollfd)); fds 548 tools/usb/usbip/src/usbipd.c fds[i].fd = sockfdlist[i]; fds 549 tools/usb/usbip/src/usbipd.c fds[i].events = POLLIN; fds 562 tools/usb/usbip/src/usbipd.c r = ppoll(fds, nsockfd, &timeout, &sigmask); fds 568 tools/usb/usbip/src/usbipd.c if (fds[i].revents & POLLIN) { fds 580 tools/usb/usbip/src/usbipd.c free(fds); fds 38 tools/virtio/virtio_test.c struct pollfd fds[1]; fds 109 tools/virtio/virtio_test.c dev->fds[info->idx].fd = info->call; fds 110 tools/virtio/virtio_test.c dev->fds[info->idx].events = POLLIN; fds 147 tools/virtio/virtio_test.c poll(dev->fds, dev->nvqs, -1); fds 149 tools/virtio/virtio_test.c if (dev->fds[i].revents & POLLIN) { fds 150 tools/virtio/virtio_test.c read(dev->fds[i].fd, &val, sizeof val);