Source File
debugcall.go
Belonging Package
runtime
package runtime
import
const (
debugCallSystemStack = "executing on Go runtime stack"
debugCallUnknownFunc = "call from unknown function"
debugCallRuntime = "call from within the Go runtime"
debugCallUnsafePoint = "call not at safe point"
)
func ()
func ( interface{})
if getg() != getg().m.curg {
return debugCallSystemStack
}
return debugCallSystemStack
}
var string
systemstack(func() {
:= findfunc()
if !.valid() {
= debugCallUnknownFunc
return
}
:= funcname()
switch {
case "debugCall32",
"debugCall64",
"debugCall128",
"debugCall256",
"debugCall512",
"debugCall1024",
"debugCall2048",
"debugCall4096",
"debugCall8192",
"debugCall16384",
"debugCall32768",
return
}
if := "runtime."; len() > len() && [:len()] == {
= debugCallRuntime
return
}
if != .entry {
--
}
:= pcdatavalue(, _PCDATA_UnsafePoint, , nil)
= debugCallUnsafePoint
}
})
return
}
func ( uintptr) {
var bool
var uint32
:= getcallerpc()
:= getg()
.waitreason = waitReasonDebugCall
if trace.enabled {
traceGoPark(traceEvGoBlock, 1)
}
casgstatus(, _Grunning, _Gwaiting)
dropg()
if trace.enabled {
traceGoSched()
}
casgstatus(, _Grunning, _Grunnable)
dropg()
lock(&sched.lock)
globrunqput()
unlock(&sched.lock)
if trace.enabled {
traceGoUnpark(, 0)
}
casgstatus(, _Gwaiting, _Grunnable)
execute(, true)
})
}
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |