David Daney wrote:
> Casey Marshall wrote:
>> Here is a patch to implement a Selector using the epoll_wait call on
>> Linux, the preferred event notification facility in the 2.6 series
>> kernels.
>>
>> This seems to test OK, so I'll probably just commit this soon. It
>> compiles OK on systems that do and don't have epoll, and on Linux the
>> Mauve tests for Selector pass.
>>   
> I have not tested the patch, but am afraid that it may fail on linux
> systems without epoll support (2.4.x kernels I think lack epoll).  I am
> running glibc-2.3.3 which has sys/epoll.h but I think that the epoll
> syscalls may fail at runtime with ENOSYS.
> 
> Also I am running gcj/libgcj cross compiler and do not know how this
> patch will interact with libgcj.
> 
> Well those are my concerns.  I guess if things get broken by this we can
> add a configure switch to manually disable it.
> 

Thanks for mentioning this. I suppose I should have known that trying to
write software for Linux would be a minefield of crap like this :-\

Does libgcj use Classpath's NIO? I thought for a lot of these things
libgcj had its own implementation in CNI.

Note, too, that you can disable epoll (or kqueue) at run time by setting
the system property "gnu.java.nio.selectorImpl" to any string other than
"epoll" (or "kqueue"), and use the old select() based version. Maybe we
can detect ENOSYS at run time, and disable epoll selectors.

Thanks.

Reply via email to