8200583: (se) Selector clean-up, part 4

Alan Bateman Alan.Bateman at oracle.com
Wed Apr 4 19:54:44 UTC 2018


This is part 4 of the Selector clean-up patches. In the round we have:

1. SelectorKeyImpl.channel is changed to a private field. The Selector 
implementation are changed to use the key's translateXXX and getFDVal 
methods (essentially ski.channel.$M -> ski.$M).

2. The /dev/poll handles EINTR in native code which is inconsistent with 
the other implementations. I've changed this, and also removed change it 
to include devpoll.h to avoid having a copy of the struct/definitions.

3. interestOps doesn't need to queue the translate ops to the Selectors. 
Instead the Selectors just need the key. This reduces the need to update 
the registrations in the kernel when the same key is changed more than 
once. Related is that implRegister doesn't need the key in most 
implementations, it can register when the interest ops are initially set.

The changes should be easy to review. The tests are passing on all 
platforms.
    http://cr.openjdk.java.net/~alanb/8200583/webrev/index.html

-Alan


More information about the nio-dev mailing list