tag | cbbc21e1c2101e3599b6c4e0003c1e7650c1fe26 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Thu May 04 16:18:05 2023 -0700 |
object | 052f06c4215707797ece21d5bfd38d25ddac125c |
Platform Tools Release 34.0.1 (9680074)
commit | 052f06c4215707797ece21d5bfd38d25ddac125c | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Mar 02 15:33:03 2023 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Mar 02 15:33:03 2023 +0000 |
tree | e3fcc9da16c47182e3325d03746beb096a29ccda | |
parent | a620c92011a644815a0c5fcc6b10c60ab6b2cdc1 [diff] | |
parent | cadf47b7eedeb22d58e36f822a9e5f6b6d4bac5c [diff] |
Snap for 9679998 from cadf47b7eedeb22d58e36f822a9e5f6b6d4bac5c to sdk-release Change-Id: I863dc06a599d1ec8eeb4e7a5664b7c063381df32
Atomic<T>
for RustA Rust library which provides a generic Atomic<T>
type for all T: Copy
types, unlike the standard library which only provides a few fixed atomic types (AtomicBool
, AtomicIsize
, AtomicUsize
, AtomicPtr
).
This library will use native atomic instructions if possible, and will otherwise fall back to a lock-based mechanism. You can use the Atomic::<T>::is_lock_free()
function to check whether native atomic operations are supported for a given type. Note that a type must have a power-of-2 size and alignment in order to be used by native atomic instructions.
This crate uses #![no_std]
and only depends on libcore.
Add this to your Cargo.toml
:
[dependencies] atomic = "0.5"
and this to your crate root:
extern crate atomic;
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.