#include <epoll.h>
◆ Epoll() [1/3]
cuttlefish::Epoll::Epoll |
( |
| ) |
|
|
default |
◆ Epoll() [2/3]
cuttlefish::Epoll::Epoll |
( |
Epoll && |
other | ) |
|
◆ Epoll() [3/3]
cuttlefish::Epoll::Epoll |
( |
SharedFD |
epoll_fd | ) |
|
|
private |
◆ Add()
Result< void > cuttlefish::Epoll::Add |
( |
SharedFD |
fd, |
|
|
uint32_t |
events |
|
) |
| |
◆ AddOrModify()
Result< void > cuttlefish::Epoll::AddOrModify |
( |
SharedFD |
fd, |
|
|
uint32_t |
events |
|
) |
| |
◆ Create()
◆ Delete()
◆ Modify()
Result< void > cuttlefish::Epoll::Modify |
( |
SharedFD |
fd, |
|
|
uint32_t |
events |
|
) |
| |
◆ operator=()
Epoll & cuttlefish::Epoll::operator= |
( |
Epoll && |
other | ) |
|
◆ Wait()
◆ epoll_fd_
◆ epoll_mutex_
std::shared_mutex cuttlefish::Epoll::epoll_mutex_ |
|
private |
This read-write mutex is read-locked to perform epoll operations, and write-locked to replace the file descriptor.
A read-write mutex is used here to make it possible to update the watched set while the epoll resource is being waited on by another thread, while excluding the possibility of the move constructor or assignment constructor from stealing the file descriptor out from under waiting threads.
◆ watched_
◆ watched_mutex_
std::shared_mutex cuttlefish::Epoll::watched_mutex_ |
|
private |
This read-write mutex is read-locked when interacting with it as a const std::set, and write-locked when interacting with it as a std::set.
The documentation for this class was generated from the following files: