diff options
Diffstat (limited to 'src/runtime/mfinal.go')
-rw-r--r-- | src/runtime/mfinal.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/runtime/mfinal.go b/src/runtime/mfinal.go index f3f3a79fa5..a379cce8a3 100644 --- a/src/runtime/mfinal.go +++ b/src/runtime/mfinal.go @@ -75,6 +75,12 @@ var finalizer1 = [...]byte{ 0<<0 | 1<<1 | 1<<2 | 1<<3 | 1<<4 | 0<<5 | 1<<6 | 1<<7, } +// lockRankMayQueueFinalizer records the lock ranking effects of a +// function that may call queuefinalizer. +func lockRankMayQueueFinalizer() { + lockWithRankMayAcquire(&finlock, getLockRank(&finlock)) +} + func queuefinalizer(p unsafe.Pointer, fn *funcval, nret uintptr, fint *_type, ot *ptrtype) { if gcphase != _GCoff { // Currently we assume that the finalizer queue won't |