mirror of
https://github.com/tailscale/tailscale.git
synced 2026-11-20 00:31:17 -08:00
Time.LoadAtomic and StoreAtomic only worked on 32-bit platforms if the field happened to be 64-bit aligned, which tstun and magicsock each guarded with a test. AtomicTime wraps an atomic.Int64, so the compiler guarantees its alignment, and the tests can go. Also use it for tstime/rate's Limiter.next, which was an atomic.Int64 holding a mono.Time. Updates #cleanup Updates #22290 (where this was discovered) Change-Id: I02807906ed9be59446456853bccece6e32e472ed Signed-off-by: Brad Fitzpatrick <[email protected]>