]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix typo in gc bug fix
authorRuss Cox <rsc@golang.org>
Thu, 28 Apr 2011 04:20:37 +0000 (00:20 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 28 Apr 2011 04:20:37 +0000 (00:20 -0400)
This time for sure.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4437078

src/pkg/runtime/mgc0.c

index 276e70fd04c66aaf0eb8365932334559a629a258..ac6a1fa40deb6dc97dd7094dc4236ce6647a94f1 100644 (file)
@@ -344,13 +344,12 @@ scanstack(G *gp)
                // The goroutine is usually asleep (the world is stopped).
                sp = gp->sched.sp;
 
-               // The exception is that if gp->status == Gsyscall, the goroutine
-               // is about to enter or might have just exited a system call, in
-               // which case it may be executing code such as schedlock and
-               // may have needed to start a new stack segment.
+               // The exception is that if the goroutine is about to enter or might
+               // have just exited a system call, it may be executing code such
+               // as schedlock and may have needed to start a new stack segment.
                // Use the stack segment and stack pointer at the time of
-               // the entersyscall.
-               if(g->gcstack != nil) {
+               // the system call instead, since that won't change underfoot.
+               if(gp->gcstack != nil) {
                        stk = (Stktop*)gp->gcstack;
                        sp = gp->gcsp;
                        guard = gp->gcguard;