On 22 Feb 2014, at 09:33, Alan Bateman <alan.bate...@oracle.com> wrote:
> On 22/02/2014 08:29, Chris Hegarty wrote: >> Interruptible I/O on Solaris has been highly problematic and the long >> standing plan has been to remove it from the JDK. In JDK6 the VM option >> UseVMInterruptibleIO was introduced to allow developers/customers experiment >> with disabling it. In JDK7 the default value of UseVMInterruptibleIO was >> changed to be "false" so that it is disabled by default. It is now finally >> being removed. >> >> This bug tracks changing the native in src/share/native/java/net and >> src/solaris/native/java/net so that the system calls are used directly >> rather than going through the JVM_* functions. >> >> http://cr.openjdk.java.net/~chegar/8034174/webrev.00/webrev/ >> > Thank for you for doing this, it's long over due. > > I've taken a first pass over this and it looks good. For NET_RecvFrom and > other that take a socket address then maybe the len should be a size_t rather > than int (they may have been in the JVM_* function due to difference in the > definitions of size_t, which is no longer a concern here I think). Yes, possibly. This will have to change across all “unix” platforms since there are shared definitions. I’ll see what impact this will have. > One comment on the Windows changes is that it might be clearer if they were > changed to check for SOCKET_ERROR rather than -1 as that matches the Windows > Sockets documentation. Yes, of course. Makes sense. > I also notice that several of the files include jvm.h and I wonder if this is > needed now. I’ll ensure that it is not included anywhere it is not needed, but there are some other usages of JVM_CurrentTimeMillis, etc ( which could also probably be cleaned up ). > In JNI_OnLoad then it uses GetEnv to check the JNI version and I assume this > code can just be removed. Right. We still need to get the JNIEnv, as it is needed further down in this function, so need to call GetEnv. I just changed this to handle errors, but maybe there is a better way? > In net_util.h the removal of JVM_* means it means "like the system > procedures", maybe it should be system calls or system functions. Thanks, I’ll update this to, “like the systems calls”. As always when you touch this native code, where to draw the line between resolving the actual problem and cleaning up! -Chris. > -Alan. > > > > > >