Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 58 for casgstatus (0.15 sec)

  1. src/runtime/coro.go

    	setGNoWB(&mp.curg, gnext)
    	setMNoWB(&gnext.m, mp)
    	if !gnext.atomicstatus.CompareAndSwap(_Gwaiting, _Grunning) {
    		// The CAS failed: use casgstatus, which will take care of
    		// coordinating with the garbage collector about the state change.
    		casgstatus(gnext, _Gwaiting, _Grunnable)
    		casgstatus(gnext, _Grunnable, _Grunning)
    	}
    
    	// Donate locked state.
    	if locked {
    		mp.lockedg.set(gnext)
    		gnext.lockedm.set(mp)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 19:09:18 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  2. src/runtime/debugcall.go

    			// stack trace, but we won't own the stack after the
    			// transition anymore.
    			trace.GoSched()
    		}
    		casgstatus(gp, _Grunning, _Grunnable)
    		if trace.ok() {
    			traceRelease(trace)
    		}
    		dropg()
    		lock(&sched.lock)
    		globrunqput(gp)
    		unlock(&sched.lock)
    
    		trace = traceAcquire()
    		casgstatus(callingG, _Gwaiting, _Grunnable)
    		if trace.ok() {
    			trace.GoUnpark(callingG, 0)
    			traceRelease(trace)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 05 20:50:21 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  3. src/runtime/proc.go

    // casGToWaiting transitions gp from old to _Gwaiting, and sets the wait reason.
    //
    // Use this over casgstatus when possible to ensure that a waitreason is set.
    func casGToWaiting(gp *g, old uint32, reason waitReason) {
    	// Set the wait reason before calling casgstatus, because casgstatus will use it.
    	gp.waitreason = reason
    	casgstatus(gp, old, _Gwaiting)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 207.5K bytes
    - Viewed (0)
  4. src/runtime/stack.go

    	// so it must be Grunning (or Gscanrunning).
    	casgstatus(gp, _Grunning, _Gcopystack)
    
    	// The concurrent GC will not scan the stack while we are doing the copy since
    	// the gp is in a Gcopystack status.
    	copystack(gp, newsize)
    	if stackDebug >= 1 {
    		print("stack grow done\n")
    	}
    	casgstatus(gp, _Gcopystack, _Grunning)
    	gogo(&gp.sched)
    }
    
    //go:nosplit
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:31:00 UTC 2024
    - 41.1K bytes
    - Viewed (0)
  5. src/runtime/heapdump.go

    	// Call dump routine.
    	mdump(m)
    
    	// Reset dump file.
    	dumpfd = 0
    	if tmpbuf != nil {
    		sysFree(unsafe.Pointer(&tmpbuf[0]), uintptr(len(tmpbuf)), &memstats.other_sys)
    		tmpbuf = nil
    	}
    
    	casgstatus(gp.m.curg, _Gwaiting, _Grunning)
    }
    
    // dumpint() the kind & offset of each field in an object.
    func dumpfields(bv bitvector) {
    	dumpbv(&bv, 0)
    	dumpint(fieldKindEol)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 09 04:07:57 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  6. src/runtime/trace.go

    	// of time in which we could read and emit an incorrect status. Specifically:
    	//
    	//	trace := traceAcquire()
    	//  // <----> problem window
    	//	casgstatus(gp, _Gwaiting, _Grunnable)
    	//	if trace.ok() {
    	//		trace.GoUnpark(gp, 2)
    	//		traceRelease(trace)
    	//	}
    	//
    	// More precisely, if we readgstatus for a gp while another goroutine is in the problem
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:17:41 UTC 2024
    - 37.1K bytes
    - Viewed (0)
  7. src/runtime/mgcmark.go

    				return
    			}
    			if gp.gcscandone {
    				throw("g already scanned")
    			}
    			workDone += scanstack(gp, gcw)
    			gp.gcscandone = true
    			resumeG(stopped)
    
    			if selfScan {
    				casgstatus(userG, _Gwaiting, _Grunning)
    			}
    		})
    	}
    	if workCounter != nil && workDone != 0 {
    		workCounter.Add(workDone)
    		if flushBgCredit {
    			gcFlushBgCredit(workDone)
    		}
    	}
    	return workDone
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 21:25:11 UTC 2024
    - 52.5K bytes
    - Viewed (0)
  8. src/runtime/mgc.go

    			gcw.dispose()
    			endCheckmarks()
    		}
    
    		// marking is complete so we can turn the write barrier off
    		setGCPhase(_GCoff)
    		stwSwept = gcSweep(work.mode)
    	})
    
    	mp.traceback = 0
    	casgstatus(curgp, _Gwaiting, _Grunning)
    
    	trace := traceAcquire()
    	if trace.ok() {
    		trace.GCDone()
    		traceRelease(trace)
    	}
    
    	// all done
    	mp.preemptoff = ""
    
    	if gcphase != _GCoff {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 62K bytes
    - Viewed (0)
  9. src/runtime/metrics_test.go

    // the minimum amount of time that should be visible in the
    // /sync/mutex-wait:seconds metric.
    func generateMutexWaitTime(mu locker2) time.Duration {
    	// Set up the runtime to always track casgstatus transitions for metrics.
    	*runtime.CasGStatusAlwaysTrack = true
    
    	mu.Lock1()
    
    	// Start up a goroutine to wait on the lock.
    	gc := make(chan *runtime.G)
    	done := make(chan bool)
    	go func() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:52:17 UTC 2024
    - 45K bytes
    - Viewed (0)
  10. src/runtime/mgcpacer.go

    			return nil, now
    		}
    		// Run a fractional worker.
    		pp.gcMarkWorkerMode = gcMarkWorkerFractionalMode
    	}
    
    	// Run the background mark worker.
    	gp := node.gp.ptr()
    	trace := traceAcquire()
    	casgstatus(gp, _Gwaiting, _Grunnable)
    	if trace.ok() {
    		trace.GoUnpark(gp, 0)
    		traceRelease(trace)
    	}
    	return gp, now
    }
    
    // resetLive sets up the controller state for the next mark phase after the end
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 55.4K bytes
    - Viewed (0)
Back to top