API for using poll/epoll instead of select

2016-05-25 Thread Keith Packard
I'm finishing up replacing select with either poll or epoll (or other) and wanted to present the API I've constructed for this work. The goal is to hide the implementation details away from the server so that we can easily swap in OS-specific replacements. I've implemented poll and epoll back end

Re: API for using poll/epoll instead of select

2016-05-26 Thread Adam Jackson
On Wed, 2016-05-25 at 22:44 -0700, Keith Packard wrote: > It's similar to the NotifyFd interfaces added to the OS layer, but has > the ability to support both level-triggered and edge-triggered > notifications. Using edge-triggered notifications along with epoll > reduces the notifications receive

Re: API for using poll/epoll instead of select

2016-05-26 Thread Keith Packard
Adam Jackson writes: > Exposing edge/level in ospoll_add is a bit funky, you're silently > degrading edge to level if the OS backend can't do edge. kqueue could do > it if the code were written, and I suspect win32's WaitForMultipleObjects > could be made to do it if we got really wild, but Solar