private int tryReleaseExclusiveAccess(int ownerProcessId) {
    ByteBuffer headerPageBuffer = headerPage().rawPageBuffer();
    while (true) {//CAS loop
      int currentOwnerProcessId = (int)INT_HANDLE.getVolatile(headerPageBuffer, FileHeader.OWNER_PROCESS_ID_OFFSET);
      if (currentOwnerProcessId == NULL_OWNER_PID) {
        return NULL_OWNER_PID;//nothing to do (method expected to be idempotent)
      }
      if (currentOwnerProcessId != ownerProcessId) {
        //acquired by another process => return its pid as an indication of failure
        return currentOwnerProcessId;
      }
      if (INT_HANDLE.compareAndSet(headerPageBuffer, FileHeader.OWNER_PROCESS_ID_OFFSET, currentOwnerProcessId, NULL_OWNER_PID)) {
        LONG_HANDLE.setVolatile(headerPageBuffer, FileHeader.OWNERSHIP_ACQUIRED_TIMESTAMP_OFFSET, 0L);
        return NULL_OWNER_PID;
      }
    }
  }
private int tryReleaseExclusiveAccess(int ownerProcessId)