harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexei Zakharov" <alexei.zakha...@gmail.com>
Subject Re: [classlib][nio] epoll()-based Selector
Date Mon, 15 Oct 2007 13:54:26 GMT
Aleksey,

I've committed your additional patch with a build-time check.
Therefore, now Harmony won't complain about unresolved symbols on 2.4
system if it was built using 2.4 kernel headers. However, we still
have issues with running our regular epoll-based snapshots on 2.4
systems since we don't have a runtime check. I'm not advocating
implementing such check immediately. Probably for now it is enough
just to describe this limitation somewhere on our site or wiki.

Thanks,
Alexei

2007/10/12, Aleksey Shipilev <aleksey.shipilev@gmail.com>:
> 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?

Mime
View raw message