aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/proc.c
diff options
context:
space:
mode:
authorDmitriy Vyukov <dvyukov@google.com>2013-05-30 14:11:49 +0400
committerDmitriy Vyukov <dvyukov@google.com>2013-05-30 14:11:49 +0400
commit573d25a42342ae094edeafc7066646cf825eb255 (patch)
tree78d1ad5bc5e352a18465b9a5a3d2e5bd12d081af /src/pkg/runtime/proc.c
parent2c4b029b752a5aa8315e56b9563b2052fe8dd3fe (diff)
downloadgo-573d25a42342ae094edeafc7066646cf825eb255.tar.xz
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
Diffstat (limited to 'src/pkg/runtime/proc.c')
-rw-r--r--src/pkg/runtime/proc.c4
1 files changed, 4 insertions, 0 deletions
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)
{