mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: improve mstart comments
Some of the comments were unclear or outdated. Change-Id: I02e01bf60def0074c1fa760e94aa992e9e4969b9 Reviewed-on: https://go-review.googlesource.com/c/go/+/172987 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com>
This commit is contained in:
parent
fe1afe8d4c
commit
744fcfec4e
1 changed files with 5 additions and 3 deletions
|
|
@ -1125,7 +1125,7 @@ func startTheWorldWithSema(emitTraceEvent bool) int64 {
|
||||||
return startTime
|
return startTime
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called to start an M.
|
// mstart is the entry-point for new Ms.
|
||||||
//
|
//
|
||||||
// This must not split the stack because we may not even have stack
|
// This must not split the stack because we may not even have stack
|
||||||
// bounds set up yet.
|
// bounds set up yet.
|
||||||
|
|
@ -1150,9 +1150,11 @@ func mstart() {
|
||||||
_g_.stack.hi = uintptr(noescape(unsafe.Pointer(&size)))
|
_g_.stack.hi = uintptr(noescape(unsafe.Pointer(&size)))
|
||||||
_g_.stack.lo = _g_.stack.hi - size + 1024
|
_g_.stack.lo = _g_.stack.hi - size + 1024
|
||||||
}
|
}
|
||||||
// Initialize stack guards so that we can start calling
|
// Initialize stack guard so that we can start calling regular
|
||||||
// both Go and C functions with stack growth prologues.
|
// Go code.
|
||||||
_g_.stackguard0 = _g_.stack.lo + _StackGuard
|
_g_.stackguard0 = _g_.stack.lo + _StackGuard
|
||||||
|
// This is the g0, so we can also call go:systemstack
|
||||||
|
// functions, which check stackguard1.
|
||||||
_g_.stackguard1 = _g_.stackguard0
|
_g_.stackguard1 = _g_.stackguard0
|
||||||
mstart1()
|
mstart1()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue