Пример #1
0
  @NoInline
  @NoNullCheck
  @Unpreemptible
  public static void inlineLockNoInline(Object o, Offset lockOffset) {
    inlineLockHelper(o, lockOffset);

    // RaceDet: instrumentation for acquire
    if (RaceDet.syncOps() && RaceDet.isApplicableThread()) {
      if (getRecursionCountLocked(o, lockOffset) == 1) {
        Algo.acquire(o);
      }
    }
  }
Пример #2
0
  @NoInline
  @NoNullCheck
  @Unpreemptible
  private static void inlineUnlockNoInline(Object o, Offset lockOffset) {
    // RaceDet: instrument lock release
    if (RaceDet.syncOps() && RaceDet.isApplicableThread()) {
      if (getRecursionCountLocked(o, lockOffset) == 1) {
        Algo.release(o);
      }
    }

    inlineUnlockHelper(o, lockOffset);
  }