diff options
Diffstat (limited to 'libgo/go/runtime/runtime2.go')
-rw-r--r-- | libgo/go/runtime/runtime2.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libgo/go/runtime/runtime2.go b/libgo/go/runtime/runtime2.go index d50f82a..f5bfc08 100644 --- a/libgo/go/runtime/runtime2.go +++ b/libgo/go/runtime/runtime2.go @@ -677,6 +677,11 @@ type p struct { _ uint32 // Alignment for atomic fields below + // The when field of the first entry on the timer heap. + // This is updated using atomic functions. + // This is 0 if the timer heap is empty. + timer0When uint64 + // Per-P GC state gcAssistTime int64 // Nanoseconds in assistAlloc gcFractionalMarkTime int64 // Nanoseconds in fractional mark worker (atomic) @@ -708,12 +713,20 @@ type p struct { // Must hold timersLock to access. timers []*timer + // Number of timers in P's heap. + // Modified using atomic instructions. + numTimers uint32 + // Number of timerModifiedEarlier timers on P's heap. // This should only be modified while holding timersLock, // or while the timer status is in a transient state // such as timerModifying. adjustTimers uint32 + // Number of timerDeleted timers in P's heap. + // Modified using atomic instructions. + deletedTimers uint32 + // Race context used while executing timer functions. // Not for gccgo: timerRaceCtx uintptr |