- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 119 for Getg (0.04 sec)
-
src/runtime/mprof.go
var stw worldStop if all { stw = stopTheWorld(stwAllGoroutinesStack) } n := 0 if len(buf) > 0 { gp := getg() sp := getcallersp() pc := getcallerpc() systemstack(func() { g0 := getg() // Force traceback=1 to override GOTRACEBACK setting, // so that Stack's results are consistent. // GOTRACEBACK is only about crash dumps.
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/runtime1.go
} return res } // Helpers for Go. Must be NOSPLIT, must only call NOSPLIT functions, and must not block. //go:nosplit func acquirem() *m { gp := getg() gp.m.locks++ return gp.m } //go:nosplit func releasem(mp *m) { gp := getg() mp.locks-- if mp.locks == 0 && gp.preempt { // restore the preemption request in case we've cleared it in newstack gp.stackguard0 = stackPreempt } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 17:52:17 UTC 2024 - 19.3K bytes - Viewed (0) -
src/runtime/cgocall.go
throw("cgocall unavailable") } if fn == nil { throw("cgocall nil") } if raceenabled { racereleasemerge(unsafe.Pointer(&racecgosync)) } mp := getg().m mp.ncgocall++ // Reset traceback. mp.cgoCallers[0] = 0 // Announce we are entering a system call // so that the scheduler knows to create another // M to run goroutines while we are in the
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:16:47 UTC 2024 - 24.2K bytes - Viewed (0) -
src/runtime/mgcsweep.go
// // If the scavenger isn't already awake, wake it up. There's // definitely work for it to do at this point. scavenger.wake() nextMarkBitArenaEpoch() } func bgsweep(c chan int) { sweep.g = getg() lockInit(&sweep.lock, lockRankSweep) lock(&sweep.lock) sweep.parked = true c <- 1 goparkunlock(&sweep.lock, waitReasonGCSweepWait, traceBlockGCSweep, 1) for {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 08 17:52:18 UTC 2024 - 32.9K bytes - Viewed (0) -
src/runtime/mgcwork.go
// A gcWork provides the interface to produce and consume work for the // garbage collector. // // A gcWork can be used on the stack as follows: // // (preemption must be disabled) // gcw := &getg().m.p.ptr().gcw // .. call gcw.put() to produce and gcw.tryGet() to consume .. // // It's important that any use of gcWork during the mark phase prevent // the garbage collector from transitioning to mark termination since
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:53:03 UTC 2024 - 12.9K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/regalloc_test.go
checkFunc(f.f) } // Test to make sure G register is never reloaded from spill (spill of G is okay) // See #25504 func TestNoGetgLoadReg(t *testing.T) { /* Original: func fff3(i int) *g { gee := getg() if i == 0 { fff() } return gee // here } */ c := testConfigARM64(t) f := c.Fun("b1", Bloc("b1", Valu("v1", OpInitMem, types.TypeMem, 0, nil),
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 08 19:09:14 UTC 2023 - 6.3K bytes - Viewed (0) -
src/runtime/preempt.go
// directly schedule the waiter. The context switch is unavoidable in // the signal case. // //go:systemstack func suspendG(gp *g) suspendGState { if mp := getg().m; mp.curg != nil && readgstatus(mp.curg) == _Grunning { // Since we're on the system stack of this M, the user // G is stuck at an unsafe point. If another goroutine // were to try to preempt m.curg, it could deadlock.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 15:41:45 UTC 2024 - 15.1K bytes - Viewed (0) -
src/runtime/trace.go
if raceenabled { // g0 doesn't have a race context. Borrow the user G's. if getg().racectx != 0 { throw("expected racectx == 0") } getg().racectx = getg().m.curg.racectx // (This defer should get open-coded, which is safe on // the system stack.) defer func() { getg().racectx = 0 }() } // This function must not allocate while holding trace.lock:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 21:17:41 UTC 2024 - 37.1K bytes - Viewed (0) -
src/runtime/syscall_windows.go
// calls back into Go. c := &getg().m.winsyscall c.fn = fn c.n = uintptr(len(args)) if c.n != 0 { c.args = uintptr(noescape(unsafe.Pointer(&args[0]))) } cgocall(asmstdcallAddr, unsafe.Pointer(c)) // cgocall may reschedule us on to a different M, // but it copies the return values into the new M's // so we can read them from there. c = &getg().m.winsyscall return c.r1, c.r2, c.err
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 20:12:46 UTC 2024 - 16.6K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/func.go
} if t.NumResults() == 1 { n.SetType(l.Type().Result(0).Type) if n.Op() == ir.OCALLFUNC && n.Fun.Op() == ir.ONAME { if sym := n.Fun.(*ir.Name).Sym(); types.RuntimeSymName(sym) == "getg" { // Emit code for runtime.getg() directly instead of calling function. // Most such rewrites (for example the similar one for math.Sqrt) should be done in walk,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 06 15:23:18 UTC 2024 - 21.1K bytes - Viewed (0)