public void lockInterruptibly() throws InterruptedException {
   if (Thread.interrupted()) throw new InterruptedException();
   Thread caller = Thread.currentThread();
   synchronized (this) {
     if (owner_ == null) {
       owner_ = caller;
       holds_ = 1;
       return;
     } else if (caller == owner_) {
       incHolds();
       return;
     }
   }
   WaitQueue.WaitNode n = new WaitQueue.WaitNode();
   n.doWait(this);
 }