mirror of
https://github.com/golang/go
synced 2024-11-25 08:17:58 -07:00
runtime: close TODO now that 8c bug is fixed
R=r CC=golang-dev https://golang.org/cl/183138
This commit is contained in:
parent
fce5d60b38
commit
74a9fc18f6
@ -73,12 +73,8 @@ scanstack(G *gp)
|
|||||||
{
|
{
|
||||||
Stktop *stk;
|
Stktop *stk;
|
||||||
byte *sp;
|
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;
|
sp = (byte*)&gp;
|
||||||
else
|
else
|
||||||
sp = gp->sched.sp;
|
sp = gp->sched.sp;
|
||||||
@ -93,11 +89,7 @@ scanstack(G *gp)
|
|||||||
static void
|
static void
|
||||||
mark(void)
|
mark(void)
|
||||||
{
|
{
|
||||||
G* gp;
|
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;
|
|
||||||
|
|
||||||
// mark data+bss.
|
// mark data+bss.
|
||||||
// skip mheap itself, which has no interesting pointers
|
// skip mheap itself, which has no interesting pointers
|
||||||
@ -114,7 +106,7 @@ mark(void)
|
|||||||
case Gdead:
|
case Gdead:
|
||||||
break;
|
break;
|
||||||
case Grunning:
|
case Grunning:
|
||||||
if(gp != gg)
|
if(gp != g)
|
||||||
throw("mark - world not stopped");
|
throw("mark - world not stopped");
|
||||||
scanstack(gp);
|
scanstack(gp);
|
||||||
break;
|
break;
|
||||||
|
@ -388,12 +388,7 @@ starttheworld(void)
|
|||||||
void
|
void
|
||||||
mstart(void)
|
mstart(void)
|
||||||
{
|
{
|
||||||
// TODO(rsc): Change 8g not to assume that extern register
|
if(g != m->g0)
|
||||||
// variables are directly addressable. Declaring the
|
|
||||||
// local variable here works around the bug.
|
|
||||||
G* gg = g;
|
|
||||||
|
|
||||||
if(gg != m->g0)
|
|
||||||
throw("bad mstart");
|
throw("bad mstart");
|
||||||
if(m->mcache == nil)
|
if(m->mcache == nil)
|
||||||
m->mcache = allocmcache();
|
m->mcache = allocmcache();
|
||||||
@ -524,12 +519,7 @@ scheduler(void)
|
|||||||
void
|
void
|
||||||
gosched(void)
|
gosched(void)
|
||||||
{
|
{
|
||||||
// TODO(rsc): Change 8g not to assume that extern register
|
if(g == m->g0)
|
||||||
// variables are directly addressable. Declaring the
|
|
||||||
// local variable here works around the bug.
|
|
||||||
G* gg = g;
|
|
||||||
|
|
||||||
if(gg == m->g0)
|
|
||||||
throw("gosched of g0");
|
throw("gosched of g0");
|
||||||
if(gosave(&g->sched) == 0)
|
if(gosave(&g->sched) == 0)
|
||||||
gogo(&m->sched, 1);
|
gogo(&m->sched, 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user