mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8295792: Clean up old async close code
Reviewed-by: alanb
This commit is contained in:
parent
5ac6f185ee
commit
2f3f3b6185
12 changed files with 4 additions and 1159 deletions
|
@ -279,7 +279,7 @@ tcp_ping4(JNIEnv *env, SOCKETADDRESS *sa, SOCKETADDRESS *netif, jint timeout,
|
|||
SET_NONBLOCKING(fd);
|
||||
|
||||
sa->sa4.sin_port = htons(7); // echo port
|
||||
connect_rv = NET_Connect(fd, &sa->sa, sizeof(struct sockaddr_in));
|
||||
connect_rv = connect(fd, &sa->sa, sizeof(struct sockaddr_in));
|
||||
|
||||
// connection established or refused immediately, either way it means
|
||||
// we were able to reach the host!
|
||||
|
|
|
@ -479,7 +479,7 @@ tcp_ping6(JNIEnv *env, SOCKETADDRESS *sa, SOCKETADDRESS *netif, jint timeout,
|
|||
SET_NONBLOCKING(fd);
|
||||
|
||||
sa->sa6.sin6_port = htons(7); // echo port
|
||||
connect_rv = NET_Connect(fd, &sa->sa, sizeof(struct sockaddr_in6));
|
||||
connect_rv = connect(fd, &sa->sa, sizeof(struct sockaddr_in6));
|
||||
|
||||
// connection established or refused immediately, either way it means
|
||||
// we were able to reach the host!
|
||||
|
|
|
@ -224,21 +224,6 @@ void NET_ThrowUnknownHostExceptionWithGaiError(JNIEnv *env,
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(_AIX)
|
||||
|
||||
/* Initialize stubs for blocking I/O workarounds (see src/solaris/native/java/net/linux_close.c) */
|
||||
extern void aix_close_init();
|
||||
|
||||
void platformInit () {
|
||||
aix_close_init();
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
void platformInit () {}
|
||||
|
||||
#endif
|
||||
|
||||
JNIEXPORT jint JNICALL
|
||||
NET_EnableFastTcpLoopback(int fd) {
|
||||
return 0;
|
||||
|
@ -715,7 +700,7 @@ NET_Wait(JNIEnv *env, jint fd, jint flags, jint timeout)
|
|||
pfd.events |= POLLOUT;
|
||||
|
||||
errno = 0;
|
||||
read_rv = NET_Poll(&pfd, 1, nanoTimeout / NET_NSEC_PER_MSEC);
|
||||
read_rv = poll(&pfd, 1, nanoTimeout / NET_NSEC_PER_MSEC);
|
||||
|
||||
newNanoTime = JVM_NanoTime(env, 0);
|
||||
nanoTimeout -= (newNanoTime - prevNanoTime);
|
||||
|
|
|
@ -74,10 +74,6 @@ typedef union {
|
|||
/************************************************************************
|
||||
* Functions
|
||||
*/
|
||||
|
||||
int NET_Connect(int s, struct sockaddr *addr, int addrlen);
|
||||
int NET_Poll(struct pollfd *ufds, unsigned int nfds, int timeout);
|
||||
|
||||
void NET_ThrowUnknownHostExceptionWithGaiError(JNIEnv *env,
|
||||
const char* hostname,
|
||||
int gai_error);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue