Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for runtime_Semrelease (0.62 sec)

  1. src/sync/rwmutex.go

    		race.Enable()
    		fatal("sync: RUnlock of unlocked RWMutex")
    	}
    	// A writer is pending.
    	if rw.readerWait.Add(-1) == 0 {
    		// The last reader unblocks the writer.
    		runtime_Semrelease(&rw.writerSem, false, 1)
    	}
    }
    
    // Lock locks rw for writing.
    // If the lock is already locked for reading or writing,
    // Lock blocks until the lock is available.
    func (rw *RWMutex) Lock() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 21:14:51 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  2. src/sync/mutex.go

    				return
    			}
    			// Grab the right to wake someone.
    			new = (old - 1<<mutexWaiterShift) | mutexWoken
    			if atomic.CompareAndSwapInt32(&m.state, old, new) {
    				runtime_Semrelease(&m.sema, false, 1)
    				return
    			}
    			old = m.state
    		}
    	} else {
    		// Starving mode: handoff mutex ownership to the next waiter, and yield
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 21:14:51 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  3. src/sync/waitgroup.go

    	if wg.state.Load() != state {
    		panic("sync: WaitGroup misuse: Add called concurrently with Wait")
    	}
    	// Reset waiters count to 0.
    	wg.state.Store(0)
    	for ; w != 0; w-- {
    		runtime_Semrelease(&wg.sema, false, 0)
    	}
    }
    
    // Done decrements the [WaitGroup] counter by one.
    func (wg *WaitGroup) Done() {
    	wg.Add(-1)
    }
    
    // Wait blocks until the [WaitGroup] counter is zero.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 21:14:51 UTC 2024
    - 4K bytes
    - Viewed (0)
Back to top