R=r
CC=golang-dev
https://golang.org/cl/183138
{
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;
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
case Gdead:
break;
case Grunning:
- if(gp != gg)
+ if(gp != g)
throw("mark - world not stopped");
scanstack(gp);
break;
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();
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);