< prev index next >

src/java.base/macosx/classes/sun/nio/fs/BsdNativeDispatcher.java

Print this page
*** 23,12 ***
   * questions.
   */
  
  package sun.nio.fs;
  
- import jdk.internal.misc.Blocker;
- 
  /**
   * Bsd specific system calls.
   */
  
  class BsdNativeDispatcher extends UnixNativeDispatcher {
--- 23,10 ---

*** 67,17 ***
      static int clonefile(UnixPath src, UnixPath dst, int flags)
          throws UnixException
      {
          try (NativeBuffer srcBuffer = copyToNativeBuffer(src);
              NativeBuffer dstBuffer = copyToNativeBuffer(dst)) {
!             long comp = Blocker.begin();
-             try {
-                 return clonefile0(srcBuffer.address(), dstBuffer.address(),
-                                   flags);
-             } finally {
-                 Blocker.end(comp);
-             }
          }
      }
      private static native int clonefile0(long srcAddress, long dstAddress,
                                           int flags);
  
--- 65,11 ---
      static int clonefile(UnixPath src, UnixPath dst, int flags)
          throws UnixException
      {
          try (NativeBuffer srcBuffer = copyToNativeBuffer(src);
              NativeBuffer dstBuffer = copyToNativeBuffer(dst)) {
!             return clonefile0(srcBuffer.address(), dstBuffer.address(), flags);
          }
      }
      private static native int clonefile0(long srcAddress, long dstAddress,
                                           int flags);
  

*** 88,17 ***
      static void setattrlist(UnixPath path, int commonattr, long modTime,
                              long accTime, long createTime, long options)
          throws UnixException
      {
          try (NativeBuffer buffer = copyToNativeBuffer(path)) {
!             long comp = Blocker.begin();
!             try {
-                 setattrlist0(buffer.address(), commonattr, modTime, accTime,
-                              createTime, options);
-             } finally {
-                 Blocker.end(comp);
-             }
          }
      }
      private static native void setattrlist0(long pathAddress, int commonattr,
                                              long modTime, long accTime,
                                              long createTime, long options)
--- 80,12 ---
      static void setattrlist(UnixPath path, int commonattr, long modTime,
                              long accTime, long createTime, long options)
          throws UnixException
      {
          try (NativeBuffer buffer = copyToNativeBuffer(path)) {
!             setattrlist0(buffer.address(), commonattr, modTime, accTime,
!                          createTime, options);
          }
      }
      private static native void setattrlist0(long pathAddress, int commonattr,
                                              long modTime, long accTime,
                                              long createTime, long options)

*** 110,17 ***
       */
      static void fsetattrlist(int fd, int commonattr, long modTime,
                               long accTime, long createTime, long options)
          throws UnixException
      {
!         long comp = Blocker.begin();
-         try {
-             fsetattrlist0(fd, commonattr, modTime, accTime,
-                           createTime, options);
-         } finally {
-             Blocker.end(comp);
-         }
      }
      private static native void fsetattrlist0(int fd, int commonattr,
                                               long modTime, long accTime,
                                               long createTime, long options)
          throws UnixException;
--- 97,11 ---
       */
      static void fsetattrlist(int fd, int commonattr, long modTime,
                               long accTime, long createTime, long options)
          throws UnixException
      {
!         fsetattrlist0(fd, commonattr, modTime, accTime, createTime, options);
      }
      private static native void fsetattrlist0(int fd, int commonattr,
                                               long modTime, long accTime,
                                               long createTime, long options)
          throws UnixException;
< prev index next >