- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 609 for getg (0.48 sec)
-
src/runtime/lock_wasip1.go
// observe this. throw("self deadlock") } gp := getg() if gp.m.locks < 0 { throw("lock count") } gp.m.locks++ l.key = mutex_locked } func unlock(l *mutex) { unlockWithRank(l) } func unlock2(l *mutex) { if l.key == mutex_unlocked { throw("unlock of unlocked lock") } gp := getg() gp.m.locks-- if gp.m.locks < 0 { throw("lock count") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 21 21:02:20 UTC 2023 - 2K bytes - Viewed (0) -
src/runtime/debuglog_on.go
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 if getg() != mp.gsignal { l = mp.dlogCache mp.dlogCache = nil } releasem(mp) return l } // putCachedDlogger attempts to return l to the local cache. It
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 28 18:17:57 UTC 2021 - 1.1K 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_aix.go
// This will return a pointer to errno. func miniterrno() { mp := getg().m r, _ := syscall0(&libc__Errno) mp.perrno = r } func minit() { miniterrno() minitSignals() getg().m.procid = uint64(pthread_self()) } func unminit() { unminitSignals() getg().m.procid = 0 } // Called from exitm, but not from drop, to undo the effect of thread-owned
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:53:03 UTC 2024 - 8.9K 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_debug_test.go
// a signal handler. Add the go:nowritebarrierrec annotation and restructure // this to avoid write barriers. switch h.gp.atomicstatus.Load() { case _Grunning: if getg().m != h.mp { println("trap on wrong M", getg().m, h.mp) return false } // Save the signal context h.saveSigContext(ctxt) // Set PC to debugCallV2. ctxt.setsigpc(uint64(abi.FuncPCABIInternal(debugCallV2)))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 15:41:45 UTC 2024 - 5.1K bytes - Viewed (0) -
src/runtime/print.go
func printlock() { mp := getg().m mp.locks++ // do not reschedule between printlock++ and lock(&debuglock). mp.printlock++ if mp.printlock == 1 { lock(&debuglock) } mp.locks-- // now we know debuglock is held and holding up mp.locks for us. } func printunlock() { mp := getg().m mp.printlock-- if mp.printlock == 0 { unlock(&debuglock) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jan 20 03:27:26 UTC 2023 - 5.9K 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/lockrank_off.go
} 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) { releasem(getg().m) } func lockWithRankMayAcquire(l *mutex, rank lockRank) { } //go:nosplit func assertLockHeld(l *mutex) { } //go:nosplit func assertRankHeld(r lockRank) { } //go:nosplit
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 22 14:29:04 UTC 2024 - 1.2K bytes - Viewed (0) -
src/runtime/signal_windows.go
callbackLastVCH ) // sigFetchGSafe is like getg() but without panicking // when TLS is not set. // Only implemented on windows/386, which is the only // arch that loads TLS when calling getg(). Others // use a dedicated register. func sigFetchGSafe() *g func sigFetchG() *g { if GOARCH == "386" { return sigFetchGSafe() } return getg() }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 17 20:32:29 UTC 2023 - 14.5K bytes - Viewed (0)