github.com/cockroachdb/tools@v0.0.0-20230222021103-a6d27438930d/go/analysis/passes/atomicalign/testdata/src/b/b.go (about)

     1  // Copyright 2019 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // +build !arm,!386
     6  
     7  package testdata
     8  
     9  import (
    10  	"sync/atomic"
    11  )
    12  
    13  func nonAffectedArchs() {
    14  	var s struct {
    15  		_ bool
    16  		a uint64
    17  	}
    18  	atomic.SwapUint64(&s.a, 9) // ok on 64-bit architectures
    19  }