mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-13 00:51:02 +00:00
Emscripten does not have 64 bit atomics
This commit is contained in:
@@ -2565,6 +2565,11 @@ macro_rules! atomic_impl {
|
|||||||
#[cfg(all(feature = "std", std_integer_atomics))]
|
#[cfg(all(feature = "std", std_integer_atomics))]
|
||||||
atomic_impl! {
|
atomic_impl! {
|
||||||
AtomicBool
|
AtomicBool
|
||||||
AtomicI8 AtomicI16 AtomicI32 AtomicI64 AtomicIsize
|
AtomicI8 AtomicI16 AtomicI32 AtomicIsize
|
||||||
AtomicU8 AtomicU16 AtomicU32 AtomicU64 AtomicUsize
|
AtomicU8 AtomicU16 AtomicU32 AtomicUsize
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(all(feature = "std", std_integer_atomics, not(target_os = "emscripten")))]
|
||||||
|
atomic_impl! {
|
||||||
|
AtomicI64 AtomicU64
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-2
@@ -214,9 +214,11 @@ mod lib {
|
|||||||
|
|
||||||
#[cfg(all(feature = "std", std_integer_atomics))]
|
#[cfg(all(feature = "std", std_integer_atomics))]
|
||||||
pub use std::sync::atomic::{
|
pub use std::sync::atomic::{
|
||||||
AtomicBool, AtomicI16, AtomicI32, AtomicI64, AtomicI8, AtomicIsize, AtomicU16, AtomicU32,
|
AtomicBool, AtomicI16, AtomicI32, AtomicI8, AtomicIsize, AtomicU16, AtomicU32, AtomicU8,
|
||||||
AtomicU64, AtomicU8, AtomicUsize, Ordering,
|
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"))]
|
#[cfg(any(core_duration, feature = "std"))]
|
||||||
pub use self::core::time::Duration;
|
pub use self::core::time::Duration;
|
||||||
|
|||||||
@@ -861,6 +861,11 @@ macro_rules! atomic_impl {
|
|||||||
#[cfg(all(feature = "std", std_integer_atomics))]
|
#[cfg(all(feature = "std", std_integer_atomics))]
|
||||||
atomic_impl! {
|
atomic_impl! {
|
||||||
AtomicBool
|
AtomicBool
|
||||||
AtomicI8 AtomicI16 AtomicI32 AtomicI64 AtomicIsize
|
AtomicI8 AtomicI16 AtomicI32 AtomicIsize
|
||||||
AtomicU8 AtomicU16 AtomicU32 AtomicU64 AtomicUsize
|
AtomicU8 AtomicU16 AtomicU32 AtomicUsize
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(all(feature = "std", std_integer_atomics, not(target_os = "emscripten")))]
|
||||||
|
atomic_impl! {
|
||||||
|
AtomicI64 AtomicU64
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user