diff options
| author | Damien Neil <dneil@google.com> | 2024-11-20 08:25:20 -0800 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2024-11-20 16:47:29 +0000 |
| commit | 2c02b4a2529528ddcbea493d179e8e766cba9ddb (patch) | |
| tree | a9ea3844b0b876df692b663a101722a6f7e58142 /src/runtime | |
| parent | 1d28fa8c43ab11942d967ea112e2e6a05cd8f919 (diff) | |
| download | go-2c02b4a2529528ddcbea493d179e8e766cba9ddb.tar.xz | |
runtime: remove unused casgcopystack function
Change-Id: I349b24ba5259d7abb0ae37065f704517aa4decda
Reviewed-on: https://go-review.googlesource.com/c/go/+/630155
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/runtime')
| -rw-r--r-- | src/runtime/proc.go | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/runtime/proc.go b/src/runtime/proc.go index e7f44c5b6c..6362960200 100644 --- a/src/runtime/proc.go +++ b/src/runtime/proc.go @@ -1317,28 +1317,6 @@ func casGToWaitingForGC(gp *g, old uint32, reason waitReason) { casGToWaiting(gp, old, reason) } -// casgstatus(gp, oldstatus, Gcopystack), assuming oldstatus is Gwaiting or Grunnable. -// Returns old status. Cannot call casgstatus directly, because we are racing with an -// async wakeup that might come in from netpoll. If we see Gwaiting from the readgstatus, -// it might have become Grunnable by the time we get to the cas. If we called casgstatus, -// it would loop waiting for the status to go back to Gwaiting, which it never will. -// -//go:nosplit -func casgcopystack(gp *g) uint32 { - for { - oldstatus := readgstatus(gp) &^ _Gscan - if oldstatus != _Gwaiting && oldstatus != _Grunnable { - throw("copystack: bad status, not Gwaiting or Grunnable") - } - if gp.atomicstatus.CompareAndSwap(oldstatus, _Gcopystack) { - if sg := gp.syncGroup; sg != nil { - sg.changegstatus(gp, oldstatus, _Gcopystack) - } - return oldstatus - } - } -} - // casGToPreemptScan transitions gp from _Grunning to _Gscan|_Gpreempted. // // TODO(austin): This is the only status operation that both changes |
