26#ifndef MYSQL_HARNESS_NET_TS_IMPL_LINUX_EPOLL_H_
27#define MYSQL_HARNESS_NET_TS_IMPL_LINUX_EPOLL_H_
33#include <system_error>
62 int epfd = ::epoll_create1(EPOLL_CLOEXEC);
74 if (-1 == ::epoll_ctl(epfd,
static_cast<int>(cmd), fd, ev)) {
82 int epfd, epoll_event *fd_events,
size_t num_fd_events,
83 std::chrono::milliseconds
timeout) {
85 int res = ::epoll_wait(epfd, fd_events, num_fd_events,
timeout.count());
89 }
else if (res == 0) {
Definition: expected.h:286
static bool interrupted
Definition: mysqladmin.cc:72
Definition: http_server_component.cc:34
static bool timeout(bool(*wait_condition)())
Timeout function.
Definition: log0meb.cc:498
stdx::expected< void, std::error_code > ctl(int epfd, Cmd cmd, int fd, epoll_event *ev)
Definition: linux_epoll.h:71
Cmd
Definition: linux_epoll.h:45
stdx::expected< int, std::error_code > create()
Definition: linux_epoll.h:60
auto uninterruptable(Func &&f)
Definition: linux_epoll.h:53
stdx::expected< size_t, std::error_code > wait(int epfd, epoll_event *fd_events, size_t num_fd_events, std::chrono::milliseconds timeout)
Definition: linux_epoll.h:81
std::error_code last_error_code()
get last std::error_code for socket-errors.
Definition: socket_error.h:107
std::error_code make_error_code(net::stream_errc e) noexcept
Definition: buffer.h:103
unexpected(E) -> unexpected< E >