diff options
| author | Dmitriy Vyukov <dvyukov@google.com> | 2013-06-28 17:52:17 +0400 |
|---|---|---|
| committer | Dmitriy Vyukov <dvyukov@google.com> | 2013-06-28 17:52:17 +0400 |
| commit | 1e112cd59f560129f4dca5e9af7c3cbc445850b6 (patch) | |
| tree | 8f4607e22d36f17f179fc6c28fdcc025c5caabb5 /src/pkg/runtime/stack.h | |
| parent | ab1270bcfc2410c8b4637a2e3b530a8f51494de1 (diff) | |
| download | go-1e112cd59f560129f4dca5e9af7c3cbc445850b6.tar.xz | |
runtime: preempt goroutines for GC
The last patch for preemptive scheduler,
with this change stoptheworld issues preemption
requests every 100us.
Update #543.
R=golang-dev, daniel.morsing, rsc
CC=golang-dev
https://golang.org/cl/10264044
Diffstat (limited to 'src/pkg/runtime/stack.h')
| -rw-r--r-- | src/pkg/runtime/stack.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/pkg/runtime/stack.h b/src/pkg/runtime/stack.h index b6924c198e..f56d4a7263 100644 --- a/src/pkg/runtime/stack.h +++ b/src/pkg/runtime/stack.h @@ -103,9 +103,10 @@ enum { // The actual size can be smaller than this but cannot be larger. // Checked in proc.c's runtime.malg. StackTop = 96, - - // Goroutine preemption request. - // Stored into g->stackguard0 to cause split stack check failure. - // Must be greater than any real sp. - StackPreempt = (uintptr)(intptr)0xfffffade, }; + +// Goroutine preemption request. +// Stored into g->stackguard0 to cause split stack check failure. +// Must be greater than any real sp. +// 0xfffffade in hex. +#define StackPreempt ((uintptr)-1314) |
