mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.cc] all: merge default (8d42099cdc23) into dev.cc
TBR=austin CC=golang-codereviews https://golang.org/cl/178700044
This commit is contained in:
commit
829b286f2c
17 changed files with 269 additions and 58 deletions
|
|
@ -563,13 +563,7 @@ func copystack(gp *g, newsize uintptr) {
|
|||
}
|
||||
memmove(unsafe.Pointer(new.hi-used), unsafe.Pointer(old.hi-used), used)
|
||||
|
||||
oldstatus := readgstatus(gp)
|
||||
oldstatus &^= _Gscan
|
||||
if oldstatus == _Gwaiting || oldstatus == _Grunnable {
|
||||
casgstatus(gp, oldstatus, _Gcopystack) // oldstatus is Gwaiting or Grunnable
|
||||
} else {
|
||||
gothrow("copystack: bad status, not Gwaiting or Grunnable")
|
||||
}
|
||||
oldstatus := casgcopystack(gp) // cas from Gwaiting or Grunnable to Gcopystack, return old status
|
||||
|
||||
// Swap out old stack for new one
|
||||
gp.stack = new
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue