- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 131 for getg (0.68 sec)
-
src/runtime/race.go
//go:nosplit func racerelease(addr unsafe.Pointer) { racereleaseg(getg(), addr) } //go:nosplit func racereleaseg(gp *g, addr unsafe.Pointer) { if getg().raceignore != 0 || !isvalidaddr(addr) { return } racecall(&__tsan_release, gp.racectx, uintptr(addr), 0, 0) } //go:nosplit func racereleaseacquire(addr unsafe.Pointer) { racereleaseacquireg(getg(), addr) } //go:nosplit
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:37:29 UTC 2024 - 20.4K bytes - Viewed (0) -
src/runtime/lockrank_on.go
throw("lockRank release without matching lockRank acquire") } }) releasem(getg().m) } // nosplit because it may be called from nosplit contexts. // //go:nosplit func lockWithRankMayAcquire(l *mutex, rank lockRank) { gp := getg() if gp.m.locksHeldLen == 0 { // No possibility of lock ordering problem if no other locks held return }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 22 14:29:04 UTC 2024 - 10.6K bytes - Viewed (0) -
src/runtime/os_windows.go
if ns < 0 { result = stdcall2(_WaitForSingleObject, getg().m.waitsema, uintptr(_INFINITE)) } else { start := nanotime() elapsed := int64(0) for { ms := int64(timediv(ns-elapsed, 1000000, nil)) if ms == 0 { ms = 1 } result = stdcall4(_WaitForMultipleObjects, 2, uintptr(unsafe.Pointer(&[2]uintptr{getg().m.waitsema, getg().m.resumesema})), 0, uintptr(ms))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 22:55:25 UTC 2024 - 41.5K bytes - Viewed (0) -
src/runtime/export_test.go
if !ok { // We were unable to get the requested reservation. // Release what we did get and fail. sysFreeOS(got, physPageSize) } return } func GetNextArenaHint() uintptr { return mheap_.arenaHints.addr } type G = g type Sudog = sudog func Getg() *G { return getg() } func Goid() uint64 { return getg().goid }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 17:50:53 UTC 2024 - 46.1K bytes - Viewed (0) -
src/runtime/os_plan9.go
var buf [_ERRMAX]byte if !atomic.Cas(&exiting, 0, 1) { return } getg().m.locks++ n := copy(buf[:], goexits) n = copy(buf[n:], gostringnocopy(status)) pid := getpid() for mp := (*m)(atomic.Loadp(unsafe.Pointer(&allm))); mp != nil; mp = mp.alllink { if mp.procid != 0 && mp.procid != pid { postnote(mp.procid, buf[:]) } } getg().m.locks-- } var procdir = []byte("/proc/")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 15:41:45 UTC 2024 - 10.3K bytes - Viewed (0) -
src/runtime/tracestack.go
// symbolizer. pcBuf[0] = logicalStackSentinel if getg() == gp { nstk += callers(skip+1, pcBuf[1:]) } else if gp != nil { nstk += gcallers(gp, skip, pcBuf[1:]) } } else { // Fast path: Unwind using frame pointers. pcBuf[0] = uintptr(skip) if getg() == gp { nstk += fpTracebackPCs(unsafe.Pointer(getfp()), pcBuf[1:]) } else if gp != nil { // Three cases:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 21 14:38:56 UTC 2024 - 11K bytes - Viewed (0) -
src/runtime/signal_unix.go
// it may hit stack split that is not expected here. if gp != nil { setg(nil) } badsignal(uintptr(sig), c) // Restore g if gp != nil { setg(gp) } return } setg(gp.m.gsignal) // If some non-Go code called sigaltstack, adjust. var gsignalStack gsignalStack
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 10 16:04:54 UTC 2024 - 45K bytes - Viewed (0) -
src/runtime/panic.go
if goarch.IsWasm == 0 && stringslite.HasPrefix(funcname(findfunc(pc)), "runtime.") { // Note: wasm can't tail call, so we can't get the original caller's pc. throw(msg) } // TODO: is this redundant? How could we be in malloc // but not in the runtime? runtime/internal/*, maybe? gp := getg() if gp != nil && gp.m != nil && gp.m.mallocing != 0 { throw(msg) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 17:58:53 UTC 2024 - 43.8K bytes - Viewed (0) -
src/runtime/stack.go
} if s := readgstatus(gp); s&_Gscan == 0 { // We don't own the stack via _Gscan. We could still // own it if this is our own user G and we're on the // system stack. if !(gp == getg().m.curg && getg() != getg().m.curg && s == _Grunning) { // We don't own the stack. throw("bad status in shrinkstack") } } if !isShrinkStackSafe(gp) { throw("shrinkstack at bad time") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 22:31:00 UTC 2024 - 41.1K bytes - Viewed (0) -
src/runtime/sema.go
func semacquire(addr *uint32) { semacquire1(addr, false, 0, 0, waitReasonSemacquire) } func semacquire1(addr *uint32, lifo bool, profile semaProfileFlags, skipframes int, reason waitReason) { gp := getg() if gp != gp.m.curg { throw("semacquire not on the G stack") } // Easy case. if cansemacquire(addr) { return } // Harder case: // increment waiter count
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 17:58:53 UTC 2024 - 19K bytes - Viewed (0)