mutex.lock(); if (owner != VmMagic.currentProcessor().currentThread) {
if (owner != VmProcessor.current().currentThread) {
    public final void exit() {        String exMsg = null;                mutex.lock();        if (owner != VmMagic.currentProcessor().currentThread) {            exMsg = "Current thread is not the owner of this monitor";            mutex.unlock();        } else if (lockCount <= 0) {            lockCount = 0;            exMsg = "Monitor is not locked";            mutex.unlock();        } else if (lockCount > 1) {            // Monitor is locked by current thread, decrement lockcount            lockCount--;            mutex.unlock();        } else {            // Monitor is locked by current thread and will decrement to 0.            VmMagic.currentProcessor().disableReschedule(false, null);            owner = null;            lockCount = 0;                        final VmThread t = this.enterQueue.dequeue();            VmMagic.currentProcessor().enableReschedule(false, null);            mutex.unlock();                        if (t != null) {                t.wakeupFromEnterQueue(this);            }        }        if (exMsg != null) {            Unsafe.debug(exMsg);            throw new IllegalMonitorStateException(exMsg);        }    }