code: func (m *RWMutex) Lock() {
  	atomic.AddInt64(&m.pendingWriters, 1)
  	m.mutex.Lock()
  	atomic.AddInt64(&m.writers, 1)
  	atomic.AddInt64(&m.pendingWriters, -1)
  
  	stackBufLen := RWMutexStackBufferLength()
  
  	m.stateMutex.Lock()
  	if len(m.stackBuf) < stackBufLen {
  		m.stackBuf = make([]byte, stackBufLen)
  	}
  	n := runtime.Stack(m.stackBuf, false)
  	m.lastLockStack = m.stackBuf[:n]
  	m.stateMutex.Unlock()
  }
docs: // Lock the mutex for writing