harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey Shipilev" <aleksey.shipi...@gmail.com>
Subject Re: [classlib][nio] epoll()-based Selector
Date Fri, 12 Oct 2007 15:41:40 GMT
Hi again,

I have attached the patch for build-time check to JIRA [1]. It fails
on older kernels as:

<user@box> ~ashipile/jre-r582823-work/bin/java
-Djava.nio.channels.spi.SelectorProvider=org.apache.harmony.nio.internal.EpollSelectorProviderImpl
selectnow
Server: Opening selector
Now using EpollSelectorProvider
No epoll facility support, please make sure you have build and run on
2.6.x kernel
---- exit ---

[1] https://issues.apache.org/jira/secure/attachment/12367643/selectors-epoll-6-linux2.4fallback.patch

Thanks,
Aleksey.

On 10/12/07, Aleksey Shipilev <aleksey.shipilev@gmail.com> wrote:
> Tim,
>
> I agree with your approach. I will create epoll_* stubs that would
> fail gently when called and make the preprocessor branch to compile
> them on 2.4.
>
> Thanks,
> Aleksey.
>
> On 10/12/07, Tim Ellison <t.p.ellison@gmail.com> wrote:
> > I agree that we should continue to support 2.4 kernels, especially since
> > the original (non /sys/epoll code already exists in harmony).
> >
> > Therefore I suggest we need both compile time and runtime checks, i.e.
> >
> > #if (LINUX_KERNEL_CODE >= KERNEL_VERSION(2, 6, 0))
> >   // include the epoll-based headers here
> > #else
> >  // include stubs to allow the epoll code to compile
> > #endif
> >
> > then at runtime go down the correct linux version path for implementing
> > the select functionality either using select or epoll.
> >
> > Does that make sense?
> >
> > Tim
> >
>

Mime
View raw message