diff options
Diffstat (limited to 'src/runtime/mklockrank.go')
-rw-r--r-- | src/runtime/mklockrank.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/runtime/mklockrank.go b/src/runtime/mklockrank.go index fc7c0223e4..0d50d60a22 100644 --- a/src/runtime/mklockrank.go +++ b/src/runtime/mklockrank.go @@ -169,8 +169,10 @@ stackLarge, mheap, mheapSpecial < globalAlloc; # panic is handled specially. It is implicitly below all other locks. -NONE < deadlock; -deadlock < panic; +NONE < panic; +# deadlock is not acquired while holding panic, but it also needs to be +# below all other locks. +panic < deadlock; ` // cyclicRanks lists lock ranks that allow multiple locks of the same @@ -185,6 +187,8 @@ var cyclicRanks = map[string]bool{ // Multiple hchanLeafs are acquired in hchan.sortkey() order in // syncadjustsudogs(). "hchanLeaf": true, + // The point of the deadlock lock is to deadlock. + "deadlock": true, } func main() { |