# improve cmpxchg · gitcafe/zig

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

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

Visibility: public

Requested revision: f1f998e07124f141312289ff82e0ad8d99af1cf7

Requested commit: f1f998e07124f141312289ff82e0ad8d99af1cf7

Commit: f1f998e07124f141312289ff82e0ad8d99af1cf7

Tree: 3c01eb14a0bd8e4cdd83f376097264f45efae2ff

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
improve cmpxchg

 * remove @cmpxchg, add @cmpxchgWeak and @cmpxchgStrong
   - See explanations in the langref.
 * add operand type as first parameter
 * return type is ?T where T is the operand type

closes #461

```

## Parents

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

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