< prev index next >

src/java.base/share/classes/java/nio/MappedMemoryUtils.java

Print this page
*** 96,17 ***
          } else {
              // force writeback via file descriptor
              long offset = mappingOffset(address, index);
              long mappingAddress = mappingAddress(address, offset, index);
              long mappingLength = mappingLength(offset, length);
!             long comp = Blocker.begin();
              try {
                  force0(fd, mappingAddress, mappingLength);
              } catch (IOException cause) {
                  throw new UncheckedIOException(cause);
              } finally {
!                 Blocker.end(comp);
              }
          }
      }
  
      // native methods
--- 96,17 ---
          } else {
              // force writeback via file descriptor
              long offset = mappingOffset(address, index);
              long mappingAddress = mappingAddress(address, offset, index);
              long mappingLength = mappingLength(offset, length);
!             boolean attempted = Blocker.begin();
              try {
                  force0(fd, mappingAddress, mappingLength);
              } catch (IOException cause) {
                  throw new UncheckedIOException(cause);
              } finally {
!                 Blocker.end(attempted);
              }
          }
      }
  
      // native methods
< prev index next >