From: Dmitriy Vyukov Date: Thu, 30 May 2013 10:11:49 +0000 (+0400) Subject: runtime: mark runtime.goexit as nosplit X-Git-Tag: go1.2rc2~1376 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=573d25a42342ae094edeafc7066646cf825eb255;p=gostls13.git runtime: mark runtime.goexit as nosplit Required for preemptive scheduler, see the comment. R=golang-dev, daniel.morsing CC=golang-dev https://golang.org/cl/9841047 --- diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c index 7581b35d0b..c7a8d24182 100644 --- a/src/pkg/runtime/proc.c +++ b/src/pkg/runtime/proc.c @@ -1223,6 +1223,10 @@ gosched0(G *gp) } // Finishes execution of the current goroutine. +// Need to mark it as nosplit, because it runs with sp > stackbase (as runtime·lessstack). +// Since it does not return it does not matter. But if it is preempted +// at the split stack check, GC will complain about inconsistent sp. +#pragma textflag 7 void runtime·goexit(void) {