This allows to wakeup the thread that is sleeping on Poller::poll()
[ which in our case is an epoll_wait() call ]. This is usually achieved
by using a special signal and using the pwait() variant of the sleeping
function (or using signalfd). However integrating the signal in the
Thread class is more complex than simply use the eventfd syscall which
can serve our needs.
We aren't going to use all the poller infra for now and we need it's
behavior a little bit different for what we are going to use:
- Do not use any "fair" time for each ready fd since we don't want
to set a timeout
- Allow to set the fd on Pollable after constructing it since we are
likely to embed Pollable inside other structs and just later be
able to open an fd.
- Let caller use the epoll flags directly - this is not in AP_HAL,
so there's no need to abstract them
Add system's polling infrastructure to be notified whenever a
file descriptor is ready to be read from or written to.
Adds a few classes:
* Poller, as an interface to epoll()
* Pollable, as an interface to a file descriptor