R8B-0 devpoll patch
Thu Feb 28 22:03:22 CET 2002
> Per Bergqvist <> writes:
> > [snip]
> > > Unfortunately not all files support kqueues. Pipes, fifos,
> > > sockets and ttys, as well as processes and signals, are
> > > more weird devices like usb stuff, audio, radio, etc. are not
> > Eventpoll in Linux has exactly the same problem. For this reason
> > I added poll support to the /dev/epoll device itself.
> > By doing that I can have a smaller result with "weird" files on
> > which I actually call poll(). If readiness is indicated on the
> > eventpoll file descriptor I do a EP_POLL to get the actual
> > events.
> > Would it be possible to multiplex with kqueue in a similiar way ?
> Yes, you can select(2)/poll(2) on kqueue descriptors. You can also
> register kqueue descriptors on another kqueue just to add to the
A few other questions:
1) What is the best way to check if the fd should use poll or kqueue ?
(in the Linux I do a fstat and test the mode)
2) Do you have to register EVFILT_READ and WRITE as separate event
filters or can you simply OR them in one event ?
(Check a few examples on the web and they all register separate
Will get access to a FreeBSD machine next week to test it ...
Synapse Systems AB
Phone: +46 709 686 685
More information about the erlang-questions