static void lock(Lock lock) ctex { ping(); if (lock == null) ret; try { lock.lockInterruptibly(); } catch (InterruptedException e) { O reason = vm_threadInterruptionReasonsMap().get(currentThread()); print("Locking interrupted! Reason: " + strOr(reason, "Unknown"); printStackTrace(e); rethrow(e); } // NO call to ping here! Make sure lock is always released. } static void lock(Lock lock, S msg) { print("Locking: " + msg); lock(lock); } static void lock(Lock lock, S msg, long timeout) { print("Locking: " + msg); lockOrFail(lock, timeout); } static ReentrantLock lock() { ret fairLock(); }