aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/lockrank_on.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/lockrank_on.go')
-rw-r--r--src/runtime/lockrank_on.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/runtime/lockrank_on.go b/src/runtime/lockrank_on.go
index a170569d6e..23adad7660 100644
--- a/src/runtime/lockrank_on.go
+++ b/src/runtime/lockrank_on.go
@@ -24,6 +24,9 @@ type lockRankStruct struct {
pad int
}
+// lockInit(l *mutex, rank int) sets the rank of lock before it is used.
+// If there is no clear place to initialize a lock, then the rank of a lock can be
+// specified during the lock call itself via lockWithRank(l *mutex, rank int).
func lockInit(l *mutex, rank lockRank) {
l.rank = rank
}