Lines Matching refs:fds
365 int os_pipe(int *fds, int stream, int close_on_exec) in os_pipe() argument
369 err = socketpair(AF_UNIX, type, 0, fds); in os_pipe()
376 err = os_set_exec_close(fds[0]); in os_pipe()
380 err = os_set_exec_close(fds[1]); in os_pipe()
389 close(fds[1]); in os_pipe()
390 close(fds[0]); in os_pipe()
507 ssize_t os_rcv_fd_msg(int fd, int *fds, unsigned int n_fds, in os_rcv_fd_msg() argument
511 char buf[CMSG_SPACE(sizeof(*fds) * MAX_RCV_FDS)]; in os_rcv_fd_msg()
521 .msg_controllen = CMSG_SPACE(sizeof(*fds) * n_fds), in os_rcv_fd_msg()
538 memcpy(fds, CMSG_DATA(cmsg), cmsg->cmsg_len); in os_rcv_fd_msg()
643 int os_sendmsg_fds(int fd, const void *buf, unsigned int len, const int *fds, in os_sendmsg_fds() argument
651 char control[CMSG_SPACE(sizeof(*fds) * OS_SENDMSG_MAX_FDS)]; in os_sendmsg_fds()
654 unsigned int fds_size = sizeof(*fds) * fds_num; in os_sendmsg_fds()
670 memcpy(CMSG_DATA(cmsg), fds, fds_size); in os_sendmsg_fds()
678 int os_poll(unsigned int n, const int *fds) in os_poll() argument
689 pollfds[i].fd = fds[i]; in os_poll()