Skip to content

Commit 04835ea

Browse files
committedMay 9, 2016
Add #[cfg(target_has_atomic)] to get atomic support for the current target
1 parent 50909f2 commit 04835ea

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+90
-10
lines changed
 

‎src/doc/reference.md

+5
Original file line numberDiff line numberDiff line change
@@ -2091,6 +2091,8 @@ The following configurations must be defined by the implementation:
20912091
* `target_pointer_width = "..."` - Target pointer width in bits. This is set
20922092
to `"32"` for targets with 32-bit pointers, and likewise set to `"64"` for
20932093
64-bit pointers.
2094+
* `target_has_atomic = "..."` - Set of integer sizes on which the target can perform
2095+
atomic operations. Values are `"8"`, `"16"`, `"32"`, `"64"` and `"ptr"`.
20942096
* `target_vendor = "..."` - Vendor of the target, for example `apple`, `pc`, or
20952097
simply `"unknown"`.
20962098
* `test` - Enabled when compiling the test harness (using the `--test` flag).
@@ -2295,6 +2297,9 @@ The currently implemented features of the reference compiler are:
22952297
* `cfg_target_vendor` - Allows conditional compilation using the `target_vendor`
22962298
matcher which is subject to change.
22972299

2300+
* `cfg_target_has_atomic` - Allows conditional compilation using the `target_has_atomic`
2301+
matcher which is subject to change.
2302+
22982303
* `concat_idents` - Allows use of the `concat_idents` macro, which is in many
22992304
ways insufficient for concatenating identifiers, and may be
23002305
removed entirely for something more wholesome.

‎src/libcore/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
#![feature(associated_type_defaults)]
6464
#![feature(concat_idents)]
6565
#![feature(const_fn)]
66+
#![feature(cfg_target_has_atomic)]
6667
#![feature(custom_attribute)]
6768
#![feature(fundamental)]
6869
#![feature(inclusive_range_syntax)]

0 commit comments

Comments
 (0)