< prev index next >
src/share/classes/sun/nio/ch/FileDispatcher.java
Print this page
rev 8219 : 8024900: PPC64: Enable new build on AIX (jdk part)
8024854: PPC64: Basic changes and files to build the class library on AIX
Reviewed-by: alanb, prr, sla, chegar, michaelm, mullan, art, erikj
Contributed-by: luchsh@linux.vnet.ibm.com, spoole@linux.vnet.ibm.com, thomas.stuefe@sap.com
*** 34,44 ****
public static final int NO_LOCK = -1; // Failed to lock
public static final int LOCKED = 0; // Obtained requested lock
public static final int RET_EX_LOCK = 1; // Obtained exclusive lock
public static final int INTERRUPTED = 2; // Request interrupted
! abstract int force(FileDescriptor fd, boolean metaData) throws IOException;
abstract int truncate(FileDescriptor fd, long size) throws IOException;
abstract long size(FileDescriptor fd) throws IOException;
--- 34,54 ----
public static final int NO_LOCK = -1; // Failed to lock
public static final int LOCKED = 0; // Obtained requested lock
public static final int RET_EX_LOCK = 1; // Obtained exclusive lock
public static final int INTERRUPTED = 2; // Request interrupted
! // Calling fsync on an AIX file descriptor that is opened only for reading
! // results in an error (EBADF: The FileDescriptor parameter is not a valid
! // file descriptor open for writing.). Therefore, it is necessary to prevent
! // the JVM from calling fsync for read-only file descriptors.
! // The fsync system call is used indirectly in the force method of the file
! // channel. The native method force moved from the file channel class to the
! // file dispatcher class in JDK 7. Due to this, it is not as easy anymore to
! // read the corresponding attribute of the file channel as it was done prior
! // to JDK 7. For JDK 7 a new parameter is added to the force method that
! // indicates whether a file is opened for writing.
! abstract int force(FileDescriptor fd, boolean metaData, boolean writable) throws IOException;
abstract int truncate(FileDescriptor fd, long size) throws IOException;
abstract long size(FileDescriptor fd) throws IOException;
< prev index next >