- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for recordUnlock (0.22 sec)
-
src/runtime/lock_futex.go
if v == mutex_unlocked { throw("unlock of unlocked lock") } if v == mutex_sleeping { futexwakeup(key32(&l.key), 1) } gp := getg() gp.m.mLockProfile.recordUnlock(l) gp.m.locks-- if gp.m.locks < 0 { throw("runtimeĀ·unlock: lock count") } if gp.m.locks == 0 && gp.preempt { // restore the preemption request in case we've cleared it in newstack
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 17:57:34 UTC 2024 - 5.4K bytes - Viewed (0) -
src/runtime/lock_sema.go
mp = muintptr(v &^ locked).ptr() if atomic.Casuintptr(&l.key, v, uintptr(mp.nextwaitm)) { // Dequeued an M. Wake it. semawakeup(mp) break } } } gp.m.mLockProfile.recordUnlock(l) gp.m.locks-- if gp.m.locks < 0 { throw("runtimeĀ·unlock: lock count") } if gp.m.locks == 0 && gp.preempt { // restore the preemption request in case we've cleared it in newstack
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 17:57:37 UTC 2024 - 6.8K bytes - Viewed (0) -
src/runtime/mprof.go
prof.pending = uintptr(unsafe.Pointer(l)) prof.cycles = cycles } // From unlock2, we might not be holding a p in this code. // //go:nowritebarrierrec func (prof *mLockProfile) recordUnlock(l *mutex) { if uintptr(unsafe.Pointer(l)) == prof.pending { prof.captureStack() } if gp := getg(); gp.m.locks == 1 && gp.m.mLockProfile.cycles != 0 { prof.store() } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 17:57:37 UTC 2024 - 53.3K bytes - Viewed (0)