Emscripten does not have 64 bit atomics

This commit is contained in:
David Tolnay 2019-07-16 09:54:00 -07:00
parent e89feb9635
commit 7a4c1086b5
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
3 changed files with 18 additions and 6 deletions

View File

@ -2565,6 +2565,11 @@ macro_rules! atomic_impl {
#[cfg(all(feature = "std", std_integer_atomics))]
atomic_impl! {
AtomicBool
AtomicI8 AtomicI16 AtomicI32 AtomicI64 AtomicIsize
AtomicU8 AtomicU16 AtomicU32 AtomicU64 AtomicUsize
AtomicI8 AtomicI16 AtomicI32 AtomicIsize
AtomicU8 AtomicU16 AtomicU32 AtomicUsize
}
#[cfg(all(feature = "std", std_integer_atomics, not(target_os = "emscripten")))]
atomic_impl! {
AtomicI64 AtomicU64
}

View File

@ -214,9 +214,11 @@ mod lib {
#[cfg(all(feature = "std", std_integer_atomics))]
pub use std::sync::atomic::{
AtomicBool, AtomicI16, AtomicI32, AtomicI64, AtomicI8, AtomicIsize, AtomicU16, AtomicU32,
AtomicU64, AtomicU8, AtomicUsize, Ordering,
AtomicBool, AtomicI16, AtomicI32, AtomicI8, AtomicIsize, AtomicU16, AtomicU32, AtomicU8,
AtomicUsize, Ordering,
};
#[cfg(all(feature = "std", std_integer_atomics, not(target_os = "emscripten")))]
pub use std::sync::atomic::{AtomicI64, AtomicU64};
#[cfg(any(core_duration, feature = "std"))]
pub use self::core::time::Duration;

View File

@ -861,6 +861,11 @@ macro_rules! atomic_impl {
#[cfg(all(feature = "std", std_integer_atomics))]
atomic_impl! {
AtomicBool
AtomicI8 AtomicI16 AtomicI32 AtomicI64 AtomicIsize
AtomicU8 AtomicU16 AtomicU32 AtomicU64 AtomicUsize
AtomicI8 AtomicI16 AtomicI32 AtomicIsize
AtomicU8 AtomicU16 AtomicU32 AtomicUsize
}
#[cfg(all(feature = "std", std_integer_atomics, not(target_os = "emscripten")))]
atomic_impl! {
AtomicI64 AtomicU64
}