- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 680 for unlock2 (0.33 sec)
-
src/runtime/lockrank_off.go
} func getLockRank(l *mutex) lockRank { return 0 } func lockWithRank(l *mutex, rank lockRank) { lock2(l) } // This function may be called in nosplit context and thus must be nosplit. // //go:nosplit func acquireLockRankAndM(rank lockRank) { acquirem() } func unlockWithRank(l *mutex) { unlock2(l) } // This function may be called in nosplit context and thus must be nosplit. // //go:nosplit
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 22 14:29:04 UTC 2024 - 1.2K bytes - Viewed (0) -
src/runtime/lock_futex.go
return } wait = mutex_sleeping futexsleep(key32(&l.key), mutex_sleeping, -1) } } func unlock(l *mutex) { unlockWithRank(l) } func unlock2(l *mutex) { v := atomic.Xchg(key32(&l.key), mutex_unlocked) if v == mutex_unlocked { throw("unlock of unlocked lock") } if v == mutex_sleeping { futexwakeup(key32(&l.key), 1) } gp := getg()
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/lockrank_on.go
gp.m.locksHeldLen-- break } } if !found { println(gp.m.procid, ":", l.rank.String(), l.rank, l) throw("unlock without matching lock acquire") } unlock2(l) }) } // releaseLockRankAndM releases a rank which is not associated with a mutex // lock. To maintain the invariant that an M with m.locks==0 does not hold any
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 22 14:29:04 UTC 2024 - 10.6K bytes - Viewed (0) -
src/runtime/metrics_test.go
func (m *rwmutexWrite) Unlock1() { m.mu.Unlock() } func (m *rwmutexWrite) Lock2() { m.mu.Lock() } func (m *rwmutexWrite) Unlock2() { m.mu.Unlock() } type rwmutexReadWrite struct { mu sync.RWMutex } func (m *rwmutexReadWrite) Lock1() { m.mu.RLock() } func (m *rwmutexReadWrite) Unlock1() { m.mu.RUnlock() } func (m *rwmutexReadWrite) Lock2() { m.mu.Lock() } func (m *rwmutexReadWrite) Unlock2() { m.mu.Unlock() }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 17:52:17 UTC 2024 - 45K bytes - Viewed (0) -
src/runtime/lock_sema.go
continue Loop } } if v&locked != 0 { // Queued. Wait. semasleep(-1) i = 0 } } } } func unlock(l *mutex) { unlockWithRank(l) } // We might not be holding a p in this code. // //go:nowritebarrier func unlock2(l *mutex) { gp := getg() var mp *m for { v := atomic.Loaduintptr(&l.key) if v == locked {
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
// into the profile. // // The M will collect the call stack when it unlocks the contended lock. That // minimizes the impact on the critical section of the contended lock, and // matches the mutex profile's behavior for contention in sync.Mutex: measured // at the Unlock method. // // The profile for contention on sync.Mutex blames the caller of Unlock for the // amount of contention experienced by the callers of Lock which had to wait.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 17:57:37 UTC 2024 - 53.3K bytes - Viewed (0) -
src/runtime/rwmutex.go
rw.writer.set(m) unlock(&rw.rLock) notesleep(&m.park) noteclear(&m.park) }) } else { unlock(&rw.rLock) } } // unlock unlocks rw for writing. func (rw *rwmutex) unlock() { // Announce to readers that there is no active writer. r := rw.readerCount.Add(rwmutexMaxReaders) if r >= rwmutexMaxReaders { throw("unlock of unlocked rwmutex") } // Unblock blocked readers.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 22 14:29:04 UTC 2024 - 5K bytes - Viewed (0) -
src/sync/rwmutex.go
// arrange for another goroutine to [RWMutex.RUnlock] ([RWMutex.Unlock]) it. func (rw *RWMutex) Unlock() { if race.Enabled { _ = rw.w.state race.Release(unsafe.Pointer(&rw.readerSem)) race.Disable() } // Announce to readers there is no active writer. r := rw.readerCount.Add(rwmutexMaxReaders) if r >= rwmutexMaxReaders { race.Enable() fatal("sync: Unlock of unlocked RWMutex") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 21:14:51 UTC 2024 - 7.2K bytes - Viewed (0) -
internal/dsync/drwmutex.go
// to indicate we haven't sufficiently unlocked lockers to avoid deadlocks. // // Caller may use this as an indication to call again. return !checkFailedUnlocks(*locks, tolerance) } // Unlock unlocks the write lock. // // It is a run-time error if dm is not locked on entry to Unlock. func (dm *DRWMutex) Unlock(ctx context.Context) { dm.m.Lock() dm.cancelRefresh() dm.m.Unlock()
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 19.7K bytes - Viewed (0) -
src/sync/mutex.go
if race.Enabled { race.Acquire(unsafe.Pointer(m)) } } // Unlock unlocks m. // It is a run-time error if m is not locked on entry to Unlock. // // A locked [Mutex] is not associated with a particular goroutine. // It is allowed for one goroutine to lock a Mutex and then // arrange for another goroutine to unlock it. func (m *Mutex) Unlock() { if race.Enabled { _ = m.state race.Release(unsafe.Pointer(m))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 21:14:51 UTC 2024 - 8.4K bytes - Viewed (0)