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 | 6d3ba1914e289ed223f7bb69f34604c0e2ae5384 (patch) | |
tree | 3781a05c976360f88b736c71316dadc789e02062 /src/runtime/stack1.go | |
parent | d39e7f8f9d8d330acbcfeba7e8e254b131b05f39 (diff) | |
parent | 3ebebda3a7495402239db4369d59d73749c1bfa2 (diff) | |
download | go-dev.cc.tar.gz |
[dev.cc] all: merge default (8d42099cdc23) into dev.ccdev.cc
TBR=austin
CC=golang-codereviews
https://codereview.appspot.com/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 ad83e5895..1fd61ce1a 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 |