Skip to content

Commit

Permalink
Merge pull request #1171 from Mark-Simulacrum/atomic-cfg
Browse files Browse the repository at this point in the history
Document target_has_atomic
  • Loading branch information
ehuss committed Oct 4, 2022
2 parents b5ff71d + 2325d95 commit 3c55838
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/conditional-compilation.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,25 @@ Example values:
* `"pc"`
* `"unknown"`

### `target_has_atomic`

Key-value option set for each bit width that the target supports
atomic loads, stores, and compare-and-swap operations.

When this cfg is present, all of the stable [`core::sync::atomic`] APIs are available for
the relevant atomic width.

[`core::sync::atomic`]: ../core/sync/atomic/index.html

Possible values:

* `"8"`
* `"16"`
* `"32"`
* `"64"`
* `"128"`
* `"ptr"`

### `test`

Enabled when compiling the test harness. Done with `rustc` by using the
Expand Down

0 comments on commit 3c55838

Please sign in to comment.