diff options
| author | Dmitriy Vyukov <dvyukov@google.com> | 2013-05-30 14:11:49 +0400 |
|---|---|---|
| committer | Dmitriy Vyukov <dvyukov@google.com> | 2013-05-30 14:11:49 +0400 |
| commit | 573d25a42342ae094edeafc7066646cf825eb255 (patch) | |
| tree | 78d1ad5bc5e352a18465b9a5a3d2e5bd12d081af /src/pkg/runtime/proc.c | |
| parent | 2c4b029b752a5aa8315e56b9563b2052fe8dd3fe (diff) | |
| download | go-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.c | 4 |
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) { |
