]> Cypherpunks repositories - gostls13.git/commit
runtime: use atomic types in mspanset.go for alignment and type safety
authorMichael Anthony Knyszek <mknyszek@google.com>
Wed, 7 Sep 2022 19:58:34 +0000 (19:58 +0000)
committerGopher Robot <gobot@golang.org>
Thu, 8 Sep 2022 15:48:37 +0000 (15:48 +0000)
commitd61ffe8b6c2125cb3110753351405136b837c97d
tree7a55fcc584730449399e10f6977d10d8e16ecedd
parent403f91c24430213b6a8efb3d143b6eae08b02ec2
runtime: use atomic types in mspanset.go for alignment and type safety

Right now, span sets use a lot of unsafe.Pointer and naked atomics
operations. This change modifies it to use atomic types everywhere and
wraps any atomic.UnsafePointer in a type to improve type safety.

This change should functionally be a no-op.

Change-Id: I32e6c460faaf6ec41ab1163158f6da7938eef3de
Reviewed-on: https://go-review.googlesource.com/c/go/+/429218
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Keith Randall <khr@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/runtime/mspanset.go