]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix scheduling bug - world wasn't stopping
authorRuss Cox <rsc@golang.org>
Wed, 30 Jun 2010 00:47:27 +0000 (17:47 -0700)
committerRuss Cox <rsc@golang.org>
Wed, 30 Jun 2010 00:47:27 +0000 (17:47 -0700)
Fixes #886.

R=r
CC=golang-dev
https://golang.org/cl/1667051

src/pkg/runtime/proc.c

index a587a7fd43120ea2966368acd3ac8ecfdd5497cd..2abb28307e317464cdb8c0e286b78b838a98d574 100644 (file)
@@ -168,7 +168,7 @@ gput(G *g)
        M *m;
 
        // If g is wired, hand it off directly.
-       if((m = g->lockedm) != nil) {
+       if(sched.mcpu < sched.mcpumax && (m = g->lockedm) != nil) {
                mnextg(m, g);
                return;
        }