diff options
| author | Russ Cox <rsc@golang.org> | 2014-12-05 11:18:10 -0500 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2014-12-05 11:18:10 -0500 |
| commit | 829b286f2c5dc450394c526cd91ba8c8bea9bac8 (patch) | |
| tree | ec666ce5582986e19a6b50467ceaac13763f2602 /src/runtime/stack1.go | |
| parent | e04c8b063fd7d7aaded8e1ff549dbb520038c61e (diff) | |
| parent | 41c6b84342b27353ed40aa3942ef8647631a322b (diff) | |
| download | go-829b286f2c5dc450394c526cd91ba8c8bea9bac8.tar.xz | |
[dev.cc] all: merge default (8d42099cdc23) into dev.cc
TBR=austin
CC=golang-codereviews
https://golang.org/cl/178700044
Diffstat (limited to 'src/runtime/stack1.go')
| -rw-r--r-- | src/runtime/stack1.go | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/runtime/stack1.go b/src/runtime/stack1.go index ad83e58951..1fd61ce1a2 100644 --- a/src/runtime/stack1.go +++ b/src/runtime/stack1.go @@ -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 |
