1
0
mirror of https://github.com/golang/go synced 2024-11-26 16:16:57 -07:00

runtime: remove gcCPULimiterState padding for atomic fields alignment

assistTimePool and lastUpdate are now atomic.Int64, so they are
guaranteed to have 64-bit alignment, even on 32-bit platforms.

Change-Id: Ib6062a47c3a92d46d43899e1ae9d119e7f5b8bb0
Reviewed-on: https://go-review.googlesource.com/c/go/+/425460
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
Cuong Manh Le 2022-08-25 11:25:32 +07:00 committed by Gopher Robot
parent 78aef56062
commit a52f4952cb

View File

@ -55,8 +55,6 @@ type gcCPULimiterState struct {
// the mark and sweep phases.
transitioning bool
_ uint32 // Align assistTimePool and lastUpdate on 32-bit platforms.
// assistTimePool is the accumulated assist time since the last update.
assistTimePool atomic.Int64