Actually implement EpollTable::GetEpoll

This commit is contained in:
Marcin Mikołajczyk 2025-07-14 21:35:37 +01:00
parent ff4570f1cf
commit aa684452eb

View File

@ -60,8 +60,13 @@ void EpollTable::DeleteHandle(int d) {
UNREACHABLE();
}
Epoll* EpollTable::GetEpoll(int d) {
UNREACHABLE();
Epoll* EpollTable::GetEpoll(int epollid) {
std::scoped_lock lock{m_mutex};
if (epollid >= epolls.size() || epolls[epollid].Destroyed()) {
return nullptr;
}
return &epolls[epollid];
}
} // namespace Libraries::Net