Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for dequeue1 (0.08 sec)

  1. src/runtime/lock_sema.go

    		if v == locked {
    			if atomic.Casuintptr(&l.key, locked, 0) {
    				break
    			}
    		} else {
    			// Other M's are waiting for the lock.
    			// Dequeue an M.
    			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 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:57:37 UTC 2024
    - 6.8K bytes
    - Viewed (0)
Back to top