aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/proc.c
diff options
context:
space:
mode:
authorDmitriy Vyukov <dvyukov@google.com>2013-02-20 12:13:04 +0400
committerDmitriy Vyukov <dvyukov@google.com>2013-02-20 12:13:04 +0400
commita92e11a256d8a527d547a2772992d9d9870fa817 (patch)
tree67d3aca20562984dc317af4564393e69e5ac7da4 /src/pkg/runtime/proc.c
parent92ab6fb4e1e994c951749e4ed82c88d99bd10f0c (diff)
downloadgo-a92e11a256d8a527d547a2772992d9d9870fa817.tar.xz
runtime: ensure forward progress of runtime.Gosched() for locked goroutines
The removed code leads to the situation when M executes the same locked G again and again. This is https://golang.org/cl/7310096 but with return instead of break in the nested switch. Fixes #4820. R=golang-dev, alex.brainman, rsc CC=golang-dev https://golang.org/cl/7304102
Diffstat (limited to 'src/pkg/runtime/proc.c')
-rw-r--r--src/pkg/runtime/proc.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c
index f8ddf9b47e..5c60cddf9b 100644
--- a/src/pkg/runtime/proc.c
+++ b/src/pkg/runtime/proc.c
@@ -397,14 +397,6 @@ canaddmcpu(void)
static void
gput(G *gp)
{
- M *mp;
-
- // If g is wired, hand it off directly.
- if((mp = gp->lockedm) != nil && canaddmcpu()) {
- mnextg(mp, gp);
- return;
- }
-
// If g is the idle goroutine for an m, hand it off.
if(gp->idlem != nil) {
if(gp->idlem->idleg != nil) {