From 72154b042fc0e8399b44ad15af48f1f7aa8791ef Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Fri, 26 Sep 2008 14:10:26 -0700 Subject: [PATCH] go/acid/go R=r DELTA=99 (95 added, 1 deleted, 3 changed) OCL=15983 CL=15992 --- src/runtime/Makefile | 4 ++-- src/runtime/proc.c | 6 +++--- src/runtime/runtime.h | 1 - 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/runtime/Makefile b/src/runtime/Makefile index 2cdb4a9793..b9e5770103 100644 --- a/src/runtime/Makefile +++ b/src/runtime/Makefile @@ -59,5 +59,5 @@ sys_file.$O: sys_file.c sys_types.h $(OS_H) %.$O: %.s $(AS) $< -runtime.acid: runtime.h - $(CC) -a runtime.h >runtime.acid +runtime.acid: runtime.h proc.c + $(CC) -a proc.c >runtime.acid diff --git a/src/runtime/proc.c b/src/runtime/proc.c index 4fdcd4ec29..58c791b6e4 100644 --- a/src/runtime/proc.c +++ b/src/runtime/proc.c @@ -297,7 +297,7 @@ static void readylocked(G *g) { M *m; - + if(g->m){ // Running on another machine. // Ready it when it stops. @@ -346,7 +346,7 @@ nextgandunlock(void) mput(m); if(sched.mcount == sched.mwait) - prints("warning: all goroutines are asleep - deadlock!\n"); + throw("all goroutines are asleep - deadlock!"); m->nextg = nil; noteclear(&m->havenextg); unlock(&sched); @@ -377,7 +377,7 @@ scheduler(void) // Jumped here via gosave/gogo, so didn't // execute lock(&sched) above. lock(&sched); - + if(sched.predawn) throw("init sleeping"); diff --git a/src/runtime/runtime.h b/src/runtime/runtime.h index 86afaaa7c2..f590472439 100644 --- a/src/runtime/runtime.h +++ b/src/runtime/runtime.h @@ -186,7 +186,6 @@ struct SigTab */ extern Alg algarray[3]; extern string emptystring; -M* allm; G* allg; int32 goidgen; extern int32 gomaxprocs;