Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 175 for acquirem (0.26 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. src/runtime/trace.go

    	// events to indicate whether a P exists, rather than just making its
    	// existence implicit.
    	mp = acquirem()
    	for _, pp := range allp[len(allp):cap(allp)] {
    		pp.trace.readyNextGen(traceNextGen(gen))
    	}
    	releasem(mp)
    
    	if stopTrace {
    		// Acquire the shutdown sema to begin the shutdown process.
    		semacquire(&traceShutdownSema)
    
    		// Finish off CPU profile reading.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:17:41 UTC 2024
    - 37.1K bytes
    - Viewed (0)
  10. src/runtime/panic.go

    //go:nosplit
    func canpanic() bool {
    	gp := getg()
    	mp := acquirem()
    
    	// Is it okay for gp to panic instead of crashing the program?
    	// Yes, as long as it is running Go code, not runtime code,
    	// and not stuck in a system call.
    	if gp != mp.curg {
    		releasem(mp)
    		return false
    	}
    	// N.B. mp.locks != 1 instead of 0 to account for acquirem.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 43.8K bytes
    - Viewed (0)
Back to top