OLD | NEW |
1 // Copyright 2011 The Go Authors. All rights reserved. | 1 // Copyright 2011 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 /* | 5 /* |
6 Stack layout parameters. | 6 Stack layout parameters. |
7 Included both by runtime (compiled via 6c) and linkers (compiled via gcc). | 7 Included both by runtime (compiled via 6c) and linkers (compiled via gcc). |
8 | 8 |
9 The per-goroutine g->stackguard is set to point StackGuard bytes | 9 The per-goroutine g->stackguard is set to point StackGuard bytes |
10 above the bottom of the stack. Each function compares its stack | 10 above the bottom of the stack. Each function compares its stack |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 StackSmall = 128, | 96 StackSmall = 128, |
97 | 97 |
98 // The maximum number of bytes that a chain of NOSPLIT | 98 // The maximum number of bytes that a chain of NOSPLIT |
99 // functions can use. | 99 // functions can use. |
100 StackLimit = StackGuard - StackSystem - StackSmall, | 100 StackLimit = StackGuard - StackSystem - StackSmall, |
101 ········ | 101 ········ |
102 // The assumed size of the top-of-stack data block. | 102 // The assumed size of the top-of-stack data block. |
103 // The actual size can be smaller than this but cannot be larger. | 103 // The actual size can be smaller than this but cannot be larger. |
104 // Checked in proc.c's runtime.malg. | 104 // Checked in proc.c's runtime.malg. |
105 StackTop = 96, | 105 StackTop = 96, |
| 106 }; |
106 | 107 |
107 » // Goroutine preemption request. | 108 // Goroutine preemption request. |
108 » // Stored into g->stackguard0 to cause split stack check failure. | 109 // Stored into g->stackguard0 to cause split stack check failure. |
109 » // Must be greater than any real sp. | 110 // Must be greater than any real sp. |
110 » StackPreempt = (uintptr)(intptr)0xfffffade, | 111 // 0xfffffade in hex. |
111 }; | 112 #define StackPreempt ((uintptr)-1314) |
OLD | NEW |