]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: remove unnecessary locking
authorHector Chu <hectorchu@gmail.com>
Thu, 4 Aug 2011 04:22:39 +0000 (00:22 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 4 Aug 2011 04:22:39 +0000 (00:22 -0400)
R=rsc, dvyukov
CC=golang-dev
https://golang.org/cl/4819051

src/pkg/runtime/proc.c

index 6d8f6990b2e64d489cd4c54c56eb6e0295cc451c..7a81591007fe868952836e80ed16e3429e3191f4 100644 (file)
@@ -855,14 +855,11 @@ runtime·exitsyscall(void)
                return;
        }
 
-       schedlock();
-
        // Tell scheduler to put g back on the run queue:
        // mostly equivalent to g->status = Grunning,
        // but keeps the garbage collector from thinking
        // that g is running right now, which it's not.
        g->readyonstop = 1;
-       schedunlock();
 
        // All the cpus are taken.
        // The scheduler will ready g and put this m to sleep.