Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 487 for acquirem (0.52 sec)

  1. src/runtime/debuglog_on.go

    type dlogPerM struct {
    	dlogCache *dlogger
    }
    
    // getCachedDlogger returns a cached dlogger if it can do so
    // efficiently, or nil otherwise. The returned dlogger will be owned.
    func getCachedDlogger() *dlogger {
    	mp := acquirem()
    	// We don't return a cached dlogger if we're running on the
    	// signal stack in case the signal arrived while in
    	// get/putCachedDlogger. (Too bad we don't have non-atomic
    	// exchange!)
    	var l *dlogger
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 1.1K bytes
    - Viewed (0)
  2. src/runtime/lock_js.go

    		}
    
    		id := scheduleTimeoutEvent(delay)
    		mp := acquirem()
    		notes[n] = gp
    		notesWithTimeout[n] = noteWithTimeout{gp: gp, deadline: deadline}
    		releasem(mp)
    
    		gopark(nil, nil, waitReasonSleep, traceBlockSleep, 1)
    
    		clearTimeoutEvent(id) // note might have woken early, clear timeout
    
    		mp = acquirem()
    		delete(notes, n)
    		delete(notesWithTimeout, n)
    		releasem(mp)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 21 21:02:20 UTC 2023
    - 7.3K bytes
    - Viewed (0)
  3. src/runtime/lockrank_off.go

    }
    
    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
    func releaseLockRankAndM(rank lockRank) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 22 14:29:04 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  4. src/runtime/pinner.go

    // It's safe to call Pin on non-Go pointers, in which case Pin will do nothing.
    func (p *Pinner) Pin(pointer any) {
    	if p.pinner == nil {
    		// Check the pinner cache first.
    		mp := acquirem()
    		if pp := mp.p.ptr(); pp != nil {
    			p.pinner = pp.pinnerCache
    			pp.pinnerCache = nil
    		}
    		releasem(mp)
    
    		if p.pinner == nil {
    			// Didn't get anything from the pinner cache.
    			p.pinner = new(pinner)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 11K bytes
    - Viewed (0)
  5. src/runtime/rand.go

    //
    //go:nosplit
    //go:linkname rand
    func rand() uint64 {
    	// Note: We avoid acquirem here so that in the fast path
    	// there is just a getg, an inlined c.Next, and a return.
    	// The performance difference on a 16-core AMD is
    	// 3.7ns/call this way versus 4.3ns/call with acquirem (+16%).
    	mp := getg().m
    	c := &mp.chacha8
    	for {
    		// Note: c.Next is marked nosplit,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 31 14:32:47 UTC 2024
    - 8K bytes
    - Viewed (0)
  6. src/runtime/mgc.go

    	// allocations.
    	//
    	// TODO(prattmic): cleanup gcStart to use a more explicit "in gcStart"
    	// check for bailing.
    	mp := acquirem()
    	ready := make(chan struct{}, 1)
    	releasem(mp)
    
    	for gcBgMarkWorkerCount < gomaxprocs {
    		mp := acquirem() // See above, we allocate a closure here.
    		go gcBgMarkWorker(ready)
    		releasem(mp)
    
    		// N.B. we intentionally wait on each goroutine individually
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 62K bytes
    - Viewed (0)
  7. src/runtime/mheap.go

    	s.state.set(mSpanDead)
    	h.freeMSpanLocked(s)
    }
    
    // scavengeAll acquires the heap lock (blocking any additional
    // manipulation of the page allocator) and iterates over the whole
    // heap, scavenging every free page available.
    //
    // Must run on the system stack because it acquires the heap lock.
    //
    //go:systemstack
    func (h *mheap) scavengeAll() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:31:00 UTC 2024
    - 78K bytes
    - Viewed (0)
  8. src/runtime/lockrank_on.go

    	}
    }
    
    // acquireLockRankAndM acquires 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
    // lock-like resources, it also acquires the M.
    //
    // This function may be called in nosplit context and thus must be nosplit.
    //
    //go:nosplit
    func acquireLockRankAndM(rank lockRank) {
    	acquirem()
    
    	gp := getg()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 22 14:29:04 UTC 2024
    - 10.6K bytes
    - Viewed (0)
  9. src/runtime/proc.go

    	// and the garbage collector calls the semaphore implementation
    	// in stopTheWorld.
    	// Break the cycle by doing acquirem/releasem around new(sudog).
    	// The acquirem/releasem increments m.locks during new(sudog),
    	// which keeps the garbage collector from being invoked.
    	mp := acquirem()
    	pp := mp.p.ptr()
    	if len(pp.sudogcache) == 0 {
    		lock(&sched.sudoglock)
    		// First, try to grab a batch from central cache.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 207.5K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/test/inl_test.go

    	// be inlinable. If they have no callers in their packages, they
    	// might not actually be inlined anywhere.
    	want := map[string][]string{
    		"runtime": {
    			"add",
    			"acquirem",
    			"add1",
    			"addb",
    			"adjustpanics",
    			"adjustpointer",
    			"alignDown",
    			"alignUp",
    			"bucketMask",
    			"bucketShift",
    			"chanbuf",
    			"evacuated",
    			"fastlog2",
    			"float64bits",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 09 04:07:57 UTC 2024
    - 10.7K bytes
    - Viewed (0)
Back to top