Source file src/sync/runtime2_lockrank.go
Documentation: sync
1 // Copyright 2020 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 //go:build goexperiment.staticlockranking 6 // +build goexperiment.staticlockranking 7 8 package sync 9 10 import "unsafe" 11 12 // Approximation of notifyList in runtime/sema.go. Size and alignment must 13 // agree. 14 type notifyList struct { 15 wait uint32 16 notify uint32 17 rank int // rank field of the mutex 18 pad int // pad field of the mutex 19 lock uintptr // key field of the mutex 20 21 head unsafe.Pointer 22 tail unsafe.Pointer 23 } 24