Mercurial > hg > shenandoah-preopenjdk-archive > openjdk8 > jdk
changeset 10226:ba80109a9b3e jdk8u40-b13
Merge
author | amurillo |
---|---|
date | Mon, 03 Nov 2014 18:18:28 -0800 |
parents | 20688e65812b (current diff) e644a7f00328 (diff) |
children | 17481e84599c 014fc8b2e4c1 |
files | |
diffstat | 2 files changed, 27 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/classes/sun/nio/ch/ServerSocketChannelImpl.java Fri Oct 31 20:18:00 2014 -0700 +++ b/src/share/classes/sun/nio/ch/ServerSocketChannelImpl.java Mon Nov 03 18:18:28 2014 -0800 @@ -247,7 +247,7 @@ return null; thread = NativeThread.current(); for (;;) { - n = accept0(this.fd, newfd, isaa); + n = accept(this.fd, newfd, isaa); if ((n == IOStatus.INTERRUPTED) && isOpen()) continue; break; @@ -410,6 +410,18 @@ return sb.toString(); } + /** + * Accept a connection on a socket. + * + * @implNote Wrap native call to allow instrumentation. + */ + private int accept(FileDescriptor ssfd, FileDescriptor newfd, + InetSocketAddress[] isaa) + throws IOException + { + return accept0(ssfd, newfd, isaa); + } + // -- Native methods -- // Accepts a new connection, setting the given file descriptor to refer to
--- a/src/solaris/classes/sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java Fri Oct 31 20:18:00 2014 -0700 +++ b/src/solaris/classes/sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java Mon Nov 03 18:18:28 2014 -0800 @@ -141,7 +141,7 @@ Throwable exc = null; try { begin(); - int n = accept0(this.fd, newfd, isaa); + int n = accept(this.fd, newfd, isaa); // spurious wakeup, is this possible? if (n == IOStatus.UNAVAILABLE) { @@ -277,7 +277,7 @@ try { begin(); - int n = accept0(this.fd, newfd, isaa); + int n = accept(this.fd, newfd, isaa); if (n == IOStatus.UNAVAILABLE) { // need calling context when there is security manager as @@ -332,6 +332,18 @@ } } + /** + * Accept a connection on a socket. + * + * @implNote Wrap native call to allow instrumentation. + */ + private int accept(FileDescriptor ssfd, FileDescriptor newfd, + InetSocketAddress[] isaa) + throws IOException + { + return accept0(ssfd, newfd, isaa); + } + // -- Native methods -- private static native void initIDs();