go/src/runtime/lock_futex.go

const mutex_unlocked

const mutex_locked

const mutex_sleeping

const active_spin

const active_spin_cnt

const passive_spin

// We use the uintptr mutex.key and note.key as a uint32.
//
//go:nosplit
func key32(p *uintptr) *uint32 {}

func mutexContended(l *mutex) bool {}

func lock(l *mutex) {}

func lock2(l *mutex) {}

func unlock(l *mutex) {}

func unlock2(l *mutex) {}

// One-time notifications.
func noteclear(n *note) {}

func notewakeup(n *note) {}

func notesleep(n *note) {}

// May run with m.p==nil if called from notetsleep, so write barriers
// are not allowed.
//
//go:nosplit
//go:nowritebarrier
func notetsleep_internal(n *note, ns int64) bool {}

func notetsleep(n *note, ns int64) bool {}

// same as runtime·notetsleep, but called on user g (not g0)
// calls only nosplit functions between entersyscallblock/exitsyscall.
func notetsleepg(n *note, ns int64) bool {}

func beforeIdle(int64, int64) (*g, bool) {}

func checkTimeouts() {}