aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/runtime2.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/runtime2.go')
-rw-r--r--src/runtime/runtime2.go15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go
index 54fab050ea..5017a7a80a 100644
--- a/src/runtime/runtime2.go
+++ b/src/runtime/runtime2.go
@@ -1001,11 +1001,16 @@ func extendRandom(r []byte, n int) {
// initialize them are not required. All defers must be manually scanned,
// and for heap defers, marked.
type _defer struct {
- heap bool
- sp uintptr // sp at time of defer
- pc uintptr // pc at time of defer
- fn func() // can be nil for open-coded defers
- link *_defer // next defer on G; can point to either heap or stack!
+ heap bool
+ rangefunc bool // true for rangefunc list
+ sp uintptr // sp at time of defer
+ pc uintptr // pc at time of defer
+ fn func() // can be nil for open-coded defers
+ link *_defer // next defer on G; can point to either heap or stack!
+
+ // If rangefunc is true, *head is the head of the atomic linked list
+ // during a range-over-func execution.
+ head *atomic.Pointer[_defer]
}
// A _panic holds information about an active panic.