Commit 214a55b0 authored by Russ Cox's avatar Russ Cox

runtime: switch state back to Grunning after recovery

Fixes #733.

R=r
CC=golang-dev
https://golang.org/cl/958041
parent e7b6fe39
...@@ -128,6 +128,7 @@ mark(void) ...@@ -128,6 +128,7 @@ mark(void)
case Gdead: case Gdead:
break; break;
case Grunning: case Grunning:
case Grecovery:
if(gp != g) if(gp != g)
throw("mark - world not stopped"); throw("mark - world not stopped");
scanstack(gp); scanstack(gp);
...@@ -135,7 +136,6 @@ mark(void) ...@@ -135,7 +136,6 @@ mark(void)
case Grunnable: case Grunnable:
case Gsyscall: case Gsyscall:
case Gwaiting: case Gwaiting:
case Grecovery:
scanstack(gp); scanstack(gp);
break; break;
} }
......
...@@ -248,7 +248,7 @@ readylocked(G *g) ...@@ -248,7 +248,7 @@ readylocked(G *g)
} }
// Mark runnable. // Mark runnable.
if(g->status == Grunnable || g->status == Grunning) if(g->status == Grunnable || g->status == Grunning || g->status == Grecovery)
throw("bad g->status in ready"); throw("bad g->status in ready");
g->status = Grunnable; g->status = Grunnable;
...@@ -472,6 +472,7 @@ scheduler(void) ...@@ -472,6 +472,7 @@ scheduler(void)
// before it tests the return value.) // before it tests the return value.)
gp->sched.sp = getcallersp(d->sp - 2*sizeof(uintptr)); gp->sched.sp = getcallersp(d->sp - 2*sizeof(uintptr));
gp->sched.pc = d->pc; gp->sched.pc = d->pc;
gp->status = Grunning;
free(d); free(d);
gogo(&gp->sched, 1); gogo(&gp->sched, 1);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment