diff options
| author | Russ Cox <rsc@golang.org> | 2010-04-21 16:27:41 -0700 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2010-04-21 16:27:41 -0700 |
| commit | 857111428bbbeef6a845399f49c9f113db6bbfde (patch) | |
| tree | a67e1a329bb372280a3e089f05366154272f5420 /src/pkg/runtime/proc.c | |
| parent | 26634e5741a84a4893315ab76333269078faf6ec (diff) | |
| download | golang-857111428bbbeef6a845399f49c9f113db6bbfde.tar.gz | |
runtime: switch state back to Grunning after recovery
Fixes issue 733.
R=r
CC=golang-dev
http://codereview.appspot.com/958041
Diffstat (limited to 'src/pkg/runtime/proc.c')
| -rw-r--r-- | src/pkg/runtime/proc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c index 169f90b73..acbb3afa1 100644 --- a/src/pkg/runtime/proc.c +++ b/src/pkg/runtime/proc.c @@ -248,7 +248,7 @@ readylocked(G *g) } // 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"); g->status = Grunnable; @@ -472,6 +472,7 @@ scheduler(void) // before it tests the return value.) gp->sched.sp = getcallersp(d->sp - 2*sizeof(uintptr)); gp->sched.pc = d->pc; + gp->status = Grunning; free(d); gogo(&gp->sched, 1); } |
