blob: 08e6b6ce0bc88cb5597f6548bacd0eb19027bbfd [file] [log] [blame]
Dan Willemsenbc60c3c2021-12-15 01:09:00 -08001// Copyright 2021 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/*
6Package atomic provides atomic operations, independent of sync/atomic,
7to the runtime.
8
9On most platforms, the compiler is aware of the functions defined
10in this package, and they're replaced with platform-specific intrinsics.
11On other platforms, generic implementations are made available.
12
13Unless otherwise noted, operations defined in this package are sequentially
14consistent across threads with respect to the values they manipulate. More
15specifically, operations that happen in a specific order on one thread,
16will always be observed to happen in exactly that order by another thread.
17*/
18package atomic