tag | 9a8a8cebacee55cb162e25bafc0e297ac6531f13 | |
---|---|---|
tagger | Xin Li <delphij@google.com> | Wed Apr 24 19:37:48 2024 -0700 |
object | 3e82e7ba8020518ebdfc6aafdc489f7955e1d05c |
aml_hef_341613000 (11465779,com.google.android.healthfitness)
commit | 3e82e7ba8020518ebdfc6aafdc489f7955e1d05c | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Sat Jul 08 04:31:12 2023 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Sat Jul 08 04:31:12 2023 +0000 |
tree | 48aba01595a04f5ec8f9a35ddd61a7522da480e3 | |
parent | 96787e7e05f2c1f9bdcc72db19a9e2cc8ddf5662 [diff] | |
parent | 9f7be703379bd8dc540f375a82a1c17850e27faf [diff] |
Snap for 10460766 from 9f7be703379bd8dc540f375a82a1c17850e27faf to mainline-healthfitness-release Change-Id: Ib59e57a70fb1b6016c724b632983d159134cebc1
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.