64 static const short empty_revents = 0;
65 pollfd poll_fd[1] = { { fds[write_fd], POLLOUT, empty_revents } };
68 if ((rc = ::poll(poll_fd, 1, duration.count())) < 0)
69 throw std::system_error(errno, std::system_category());
73 static const std::uint32_t value = 1;
74 if (
sizeof(value) != write(fds[write_fd], std::addressof(value),
sizeof(value)))
75 throw std::system_error(errno, std::system_category());
80 static const short empty_revents = 0;
81 pollfd poll_fd[1] = { { fds[read_fd], POLLIN, empty_revents } };
84 if ((rc = ::poll(poll_fd, 1, duration.count())) < 0)
85 throw std::system_error(errno, std::system_category());
89 std::uint32_t value = 0;
90 if (
sizeof(value) != read(fds[read_fd], std::addressof(value),
sizeof(value)))
91 throw std::system_error(errno, std::system_category());
94 throw std::system_error(errno, std::system_category());