code: func (m *Mutex) Lock() {
  	// Uncontended case.
  	if atomic.AddInt32(&m.v, -1) == 0 {
  		return
  	}
  
  	for {
  		// Try to acquire the mutex again, at the same time making sure
  		// that m.v is negative, which indicates to the owner of the
  		// lock that it is contended, which will force it to try to wake
  		// someone up when it releases the mutex.
  		if v := atomic.LoadInt32(&m.v); v >= 0 && atomic.SwapInt32(&m.v, -1) == 1 {
  			return
  		}
  
  		// Wait for the mutex to be released before trying again.
  		<-m.ch
  	}
  }
docs: // Lock acquires the mutex. If it is currently held by another goroutine, Lock
  // will wait until it has a chance to acquire it.