mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8294068: Unconditional and eager load of nio library since JDK-8264744
Reviewed-by: alanb, redestad
This commit is contained in:
parent
84d7ff64d8
commit
e1958971c9
4 changed files with 102 additions and 161 deletions
|
@ -158,32 +158,4 @@ class LinuxFileSystem extends UnixFileSystem {
|
|||
|
||||
return directCopy0(dst, src, addressToPollForCancel);
|
||||
}
|
||||
|
||||
// -- native methods --
|
||||
|
||||
private static native void init();
|
||||
|
||||
/**
|
||||
* Copies data between file descriptors {@code src} and {@code dst} using
|
||||
* a platform-specific function or system call possibly having kernel
|
||||
* support.
|
||||
*
|
||||
* @param dst destination file descriptor
|
||||
* @param src source file descriptor
|
||||
* @param addressToPollForCancel address to check for cancellation
|
||||
* (a non-zero value written to this address indicates cancel)
|
||||
*
|
||||
* @return 0 on success, UNAVAILABLE if the platform function would block,
|
||||
* UNSUPPORTED_CASE if the call does not work with the given
|
||||
* parameters, or UNSUPPORTED if direct copying is not supported
|
||||
* on this platform
|
||||
*/
|
||||
private static native int directCopy0(int dst, int src,
|
||||
long addressToPollForCancel)
|
||||
throws UnixException;
|
||||
|
||||
static {
|
||||
jdk.internal.loader.BootLoader.loadLibrary("nio");
|
||||
init();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,6 +68,24 @@ class LinuxNativeDispatcher extends UnixNativeDispatcher {
|
|||
static native int posix_fadvise(int fd, long offset, long len, int advice)
|
||||
throws UnixException;
|
||||
|
||||
/**
|
||||
* Copies data between file descriptors {@code src} and {@code dst} using
|
||||
* a platform-specific function or system call possibly having kernel
|
||||
* support.
|
||||
*
|
||||
* @param dst destination file descriptor
|
||||
* @param src source file descriptor
|
||||
* @param addressToPollForCancel address to check for cancellation
|
||||
* (a non-zero value written to this address indicates cancel)
|
||||
*
|
||||
* @return 0 on success, UNAVAILABLE if the platform function would block,
|
||||
* UNSUPPORTED_CASE if the call does not work with the given
|
||||
* parameters, or UNSUPPORTED if direct copying is not supported
|
||||
* on this platform
|
||||
*/
|
||||
static native int directCopy0(int dst, int src, long addressToPollForCancel)
|
||||
throws UnixException;
|
||||
|
||||
// initialize
|
||||
private static native void init();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue