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.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go
index 96720846b2..789b68e54e 100644
--- a/src/runtime/runtime2.go
+++ b/src/runtime/runtime2.go
@@ -491,6 +491,10 @@ type g struct {
coroarg *coro // argument during coroutine transfers
bubble *synctestBubble
+ // xRegs stores the extended register state if this G has been
+ // asynchronously preempted.
+ xRegs xRegPerG
+
// Per-G tracer state.
trace gTraceState
@@ -760,6 +764,11 @@ type p struct {
// gcStopTime is the nanotime timestamp that this P last entered _Pgcstop.
gcStopTime int64
+ // xRegs is the per-P extended register state used by asynchronous
+ // preemption. This is an empty struct on platforms that don't use extended
+ // register state.
+ xRegs xRegPerP
+
// Padding is no longer needed. False sharing is now not a worry because p is large enough
// that its size class is an integer multiple of the cache line size (for any of our architectures).
}