]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: close TODO now that 8c bug is fixed
authorRuss Cox <rsc@golang.org>
Thu, 7 Jan 2010 03:24:11 +0000 (19:24 -0800)
committerRuss Cox <rsc@golang.org>
Thu, 7 Jan 2010 03:24:11 +0000 (19:24 -0800)
R=r
CC=golang-dev
https://golang.org/cl/183138

src/pkg/runtime/mgc0.c
src/pkg/runtime/proc.c

index 91898270d2b8ac08e0397dad8d06e2d2ff71da46..f0eafe3fd6cb8279d13ca351de375b8baec92e5f 100644 (file)
@@ -73,12 +73,8 @@ scanstack(G *gp)
 {
        Stktop *stk;
        byte *sp;
-       // TODO(rsc): Change 8g not to assume that extern register
-       // variables are directly addressable.  Declaring the
-       // local variable here works around the bug.
-       G* gg = g;
 
-       if(gp == gg)
+       if(gp == g)
                sp = (byte*)&gp;
        else
                sp = gp->sched.sp;
@@ -93,11 +89,7 @@ scanstack(G *gp)
 static void
 mark(void)
 {
-       G* gp;
-       // TODO(rsc): Change 8g not to assume that extern register
-       // variables are directly addressable.  Declaring the
-       // local variable here works around the bug.
-       G* gg = g;
+       G *gp;
 
        // mark data+bss.
        // skip mheap itself, which has no interesting pointers
@@ -114,7 +106,7 @@ mark(void)
                case Gdead:
                        break;
                case Grunning:
-                       if(gp != gg)
+                       if(gp != g)
                                throw("mark - world not stopped");
                        scanstack(gp);
                        break;
index 8dc9243261990c92c54a331eac896205f5f4d620..6ac4090ebe26f20032ce0a0a80f5740673526467 100644 (file)
@@ -388,12 +388,7 @@ starttheworld(void)
 void
 mstart(void)
 {
-       // TODO(rsc): Change 8g not to assume that extern register
-       // variables are directly addressable.  Declaring the
-       // local variable here works around the bug.
-       G* gg = g;
-
-       if(gg != m->g0)
+       if(g != m->g0)
                throw("bad mstart");
        if(m->mcache == nil)
                m->mcache = allocmcache();
@@ -524,12 +519,7 @@ scheduler(void)
 void
 gosched(void)
 {
-       // TODO(rsc): Change 8g not to assume that extern register
-       // variables are directly addressable.  Declaring the
-       // local variable here works around the bug.
-       G* gg = g;
-
-       if(gg == m->g0)
+       if(g == m->g0)
                throw("gosched of g0");
        if(gosave(&g->sched) == 0)
                gogo(&m->sched, 1);