# std.sync.atomic: extended atomic helper functions \(\#8866\) · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/eb6975f0889db4c2c29d47bb959bc39bd0a9b167)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: eb6975f0889db4c2c29d47bb959bc39bd0a9b167

Requested commit: eb6975f0889db4c2c29d47bb959bc39bd0a9b167

Commit: eb6975f0889db4c2c29d47bb959bc39bd0a9b167

Tree: 688143d7828e2717ed2246c9a2482d8f22433976

Author: protty

Committer: GitHub

## Message

```
std.sync.atomic: extended atomic helper functions (#8866)

- deprecates `std.Thread.spinLoopHint` and moves it to `std.atomic.spinLoopHint`
- added an Atomic(T) generic wrapper type which replaces atomic.Bool and atomic.Int
- in Atomic(T), selectively expose member functions depending on T and include bitwise atomic methods when T is an Integer
- added fence() and compilerFence() to std.atomic
```

## Parents

- [57cf9f7ea6d018714cf4afa711799c67ff730f12](https://git.cafe/gitcafe/zig/commit/57cf9f7ea6d018714cf4afa711799c67ff730f12?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/eb6975f0889db4c2c29d47bb959bc39bd0a9b167?format=markdown)
