public void unpin(Buffer buff){
  BlockId blk=buff.block();
  PinnedBuffer pinnedBuff=pinnedBuffers.get(blk);
  if (pinnedBuff != null) {
    pinnedBuff.pinnedCount--;
    if (pinnedBuff.pinnedCount == 0) {
      bufferPool.unpin(buff);
      pinnedBuffers.remove(blk);
synchronized (bufferPool) {
        bufferPool.notifyAll();
      }
    }
  }
}

public void unpin ( Buffer buff ) { BlockId blk = buff . block ( ) ; PinnedBuffer pinnedBuff = pinnedBuffers . get ( blk ) ; if ( pinnedBuff != null ) { pinnedBuff . pinnedCount -- ; if ( pinnedBuff . pinnedCount == 0 ) { bufferPool . unpin ( buff ) ; pinnedBuffers . remove ( blk ) ; synchronized ( bufferPool ) { bufferPool . notifyAll ( ) ; } } } }
unpins the specified buffer . if the buffer ' s pin count becomes 0 , then the threads on the wait list are notified .
