Move accept_connections() to osd_messenger_t, add a simple uring OSD stub

This commit is contained in:
Vitaliy Filippov
2020-06-08 01:32:16 +03:00
parent 437dc5b630
commit 73c80e2c39
8 changed files with 206 additions and 58 deletions
+8 -10
View File
@@ -75,15 +75,13 @@ void epoll_manager_t::handle_epoll_events()
ringloop->submit();
int nfds;
epoll_event events[MAX_EPOLL_EVENTS];
restart:
nfds = epoll_wait(epoll_fd, events, MAX_EPOLL_EVENTS, 0);
for (int i = 0; i < nfds; i++)
do
{
auto & cb = epoll_handlers[events[i].data.fd];
cb(events[i].data.fd, events[i].events);
}
if (nfds == MAX_EPOLL_EVENTS)
{
goto restart;
}
nfds = epoll_wait(epoll_fd, events, MAX_EPOLL_EVENTS, 0);
for (int i = 0; i < nfds; i++)
{
auto & cb = epoll_handlers[events[i].data.fd];
cb(events[i].data.fd, events[i].events);
}
} while (nfds == MAX_EPOLL_EVENTS);
}