RFR [9]: 8034174 Remove use of JVM_* functions from java.net code
Dmitry Samersoff
dmitry.samersoff at oracle.com
Sat Feb 22 09:23:28 PST 2014
Chris,
Didn't look to windows part. Unix part looks good for me. See also below.
I'm a bit concerned because of mixing NET_* abstractions and direct call
to OS functions. It might be better to create NET_socket etc.
We use NET_GetSockOpt/NET_SetSockOpt in one places and plain os
functions in other ones it have to be unified.
(not to your changes, but as far as you touched it)
Doing socklen_t n = sizeof(m) it's better cast to socklen_t explicitly -
on some platform socklen_t expands to int but sizeof to unsigned so it
can cause a compiler warning.
It's better to unify check of return value of os functions either as ==
-1 or as < 0
1. net_util.c
Do we really need to check JNI_VERSION ?
2. Inet4AddressImpl.c
73, 335 it's better to use NI_MAXHOST in both places
784 optlen should be socklen_t
3. Inet6AddressImpl.c
73, 143 it's better to use NI_MAXHOST in both places
4. net_util_md.c
235 gettimeofday is obsoleted and might be not available on all
platforms. So it's better to try clock_gettime first
-Dmitry
On 2014-02-22 12: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/
>
> -Chris.
>
--
Dmitry Samersoff
Oracle Java development team, Saint Petersburg, Russia
* I would love to change the world, but they won't give me the sources.
More information about the net-dev
mailing list