8196787: (ch) Moving network channels to use j.u.c locks

Reviewed-by: prappo, rriggs
This commit is contained in:
Alan Bateman 2018-02-06 16:04:46 +00:00
parent 6ff900807d
commit 8deac7d09b
10 changed files with 270 additions and 126 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -44,7 +44,7 @@ class SinkChannelImpl
implements SelChImpl
{
// The SocketChannel assoicated with this pipe
SocketChannel sc;
final SocketChannel sc;
public FileDescriptor getFD() {
return ((SocketChannelImpl)sc).getFD();

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -43,7 +43,7 @@ class SourceChannelImpl
implements SelChImpl
{
// The SocketChannel assoicated with this pipe
SocketChannel sc;
private final SocketChannel sc;
public FileDescriptor getFD() {
return ((SocketChannelImpl) sc).getFD();

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -55,8 +55,7 @@ handleSocketError(JNIEnv *env, int errorValue)
JNIEXPORT jint JNICALL
Java_sun_nio_ch_SocketChannelImpl_checkConnect(JNIEnv *env, jobject this,
jobject fdo, jboolean block,
jboolean ready)
jobject fdo, jboolean block)
{
int optError = 0;
int lastError = 0;