]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: remove gcCPULimiterState padding for atomic fields alignment
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Thu, 25 Aug 2022 04:25:32 +0000 (11:25 +0700)
committerGopher Robot <gobot@golang.org>
Fri, 26 Aug 2022 17:46:00 +0000 (17:46 +0000)
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>
src/runtime/mgclimit.go

index 485a59bdf71194f711a992a618468345f88b4780..b6fbcb14cf92df2bfc25c1ed07f0efdecfe4fbda 100644 (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