[Bug 223530] devel/libepoll-shim: Update version

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Dec 21 19:16:25 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223530

Jan Kokemüller <jan.kokemueller at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jan.kokemueller at gmail.com

--- Comment #10 from Jan Kokemüller <jan.kokemueller at gmail.com> ---
I'm the original author of the epoll-shim library. Please, if you have
improvements to the library, or are seeing a bug, post an issue or PR on Github
-- I've seen the freebsd-desktop branch and merged it almost a year ago.

The original reason for this lib was really just supporting libinput. I've
tried to port libinput to kqueue/kevent directly, but then I thought a small
epoll wrapper would be better -- the code changes to upstream could be kept to
a minimum.

Also, more Wayland related projects use epoll, so in theory they should 'just
work' with this library. I haven't really tried to get Wayland to work yet on
my side, but it is definitely also a goal of this library. For example, I've
added support for polling a DRM device. In FreeBSD, those devices don't support
kqueue yet, just poll, and therefore require a special hack in epoll-shim.

In general, the library should be quite useful if you need epoll as long as you
don't do anything too fancy.

That said, there are still some limitations:
 - forget fork/exec behavior as in Linux...
 - no edge triggering or other 'fancy' flags (EPOLLET, EPOLLONESHOT,
EPOLLEXCLUSIVE...)
 - no eventfd support yet (but who uses this, anyway?)
 - there is just support for _one_ poll/DRM device per process (yes, I know
it's currently a giant hack but it seemed to work).
 - I define 'read' and 'close' macros that point to functions of the library
because signalfd and timerfd need some special handling. This is ugly, but I
haven't found a more elegant way yet. This means that you cannot really call
vanilla 'read'/'close' on timer- and signalfds in some other translation unit
and expect everything to keep working properly. Luckily, libinput does not do
this.
 - Each timerfd spawns a thread doing some custom timer/signal stuff because
EVFILT_TIMER does not really support the itimer interface very well.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-x11 mailing list