| 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 |
|
| 7 |
package sync |
| 8 |
|
| 9 |
import "unsafe" |
| 10 |
|
| 11 |
// Approximation of notifyList in runtime/sema.go. Size and alignment must |
| 12 |
// agree. |
| 13 |
type notifyList struct { |
| 14 |
wait uint32 |
| 15 |
notify uint32 |
| 16 |
rank int // rank field of the mutex |
| 17 |
pad int // pad field of the mutex |
| 18 |
lock uintptr // key field of the mutex |
| 19 |
|
| 20 |
head unsafe.Pointer |
| 21 |
tail unsafe.Pointer |
| 22 |
} |