]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: mark runtime.goexit as nosplit
authorDmitriy Vyukov <dvyukov@google.com>
Thu, 30 May 2013 10:11:49 +0000 (14:11 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Thu, 30 May 2013 10:11:49 +0000 (14:11 +0400)
Required for preemptive scheduler, see the comment.

R=golang-dev, daniel.morsing
CC=golang-dev
https://golang.org/cl/9841047

src/pkg/runtime/proc.c

index 7581b35d0bfb262d0f18de0036d1fb1e4e8620d6..c7a8d2418257e5465a6f2996c2a5cae19ca2cad9 100644 (file)
@@ -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)
 {