From: Russ Cox Date: Tue, 1 Sep 2009 01:10:11 +0000 (-0700) Subject: add newprocreadylocked for debugger X-Git-Tag: weekly.2009-11-06~689 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=fe8ff955e9844128c53ec3620355dcbb1f478000;p=gostls13.git add newprocreadylocked for debugger R=austin DELTA=10 (9 added, 0 deleted, 1 changed) OCL=34163 CL=34166 --- diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c index bd8e954929..06859b09ca 100644 --- a/src/pkg/runtime/proc.c +++ b/src/pkg/runtime/proc.c @@ -265,6 +265,15 @@ readylocked(G *g) matchmg(); } +// Same as readylocked but a different symbol so that +// debuggers can set a breakpoint here and catch all +// new goroutines. +static void +newprocreadylocked(G *g) +{ + readylocked(g); +} + // Pass g to m for running. static void mnextg(M *m, G *g) @@ -739,7 +748,7 @@ sys·newproc(int32 siz, byte* fn, byte* arg0) goidgen++; newg->goid = goidgen; - readylocked(newg); + newprocreadylocked(newg); unlock(&sched); //printf(" goid=%d\n", newg->goid);