aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2011-04-28 00:20:37 -0400
committerRuss Cox <rsc@golang.org>2011-04-28 00:20:37 -0400
commit37b3494026882711eb2f8b817e1dbda612700fe6 (patch)
tree21b4ef870cd445a0ad3b2d3a0524a259cf05f0db
parentb6f0632e93d183bc39031c475eb79ef1986bd226 (diff)
downloadgo-37b3494026882711eb2f8b817e1dbda612700fe6.tar.gz
go-37b3494026882711eb2f8b817e1dbda612700fe6.zip
runtime: fix typo in gc bug fix
This time for sure. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/4437078
-rw-r--r--src/pkg/runtime/mgc0.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/pkg/runtime/mgc0.c b/src/pkg/runtime/mgc0.c
index 276e70fd04..ac6a1fa40d 100644
--- a/src/pkg/runtime/mgc0.c
+++ b/src/pkg/runtime/mgc0.c
@@ -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;