harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Ellison <t.p.elli...@gmail.com>
Subject Re: [classlib][nio] epoll()-based Selector
Date Fri, 12 Oct 2007 14:22:53 GMT
Aleksey Shipilev wrote:
> Hi,
> 
> Because 2.4.x kernel tree is still alive, maintained and used (rarely,
> but there are some), I would pretend that 2.4 still exists and try to
> make sure my code expect this and let the user know that epoll is not
> working on 2.4.
> 
> See http://kerneltrap.org/node/14003 to make sure that 2.4 is still alive. :)

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