Skip to content

Commit 3c55838

Browse files
authored
Merge pull request #1171 from Mark-Simulacrum/atomic-cfg
Document target_has_atomic
2 parents b5ff71d + 2325d95 commit 3c55838

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/conditional-compilation.md

+19
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,25 @@ Example values:
191191
* `"pc"`
192192
* `"unknown"`
193193

194+
### `target_has_atomic`
195+
196+
Key-value option set for each bit width that the target supports
197+
atomic loads, stores, and compare-and-swap operations.
198+
199+
When this cfg is present, all of the stable [`core::sync::atomic`] APIs are available for
200+
the relevant atomic width.
201+
202+
[`core::sync::atomic`]: ../core/sync/atomic/index.html
203+
204+
Possible values:
205+
206+
* `"8"`
207+
* `"16"`
208+
* `"32"`
209+
* `"64"`
210+
* `"128"`
211+
* `"ptr"`
212+
194213
### `test`
195214

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

0 commit comments

Comments
 (0)