#[cfg(not(portable_atomic_no_atomic_load_store))]
#[cfg_attr(
not(portable_atomic_no_cfg_target_has_atomic),
cfg(not(all(
any(target_arch = "riscv32", target_arch = "riscv64"),
not(target_has_atomic = "ptr")
)))
)]
#[cfg(any(test, not(portable_atomic_unsafe_assume_single_core)))]
mod core_atomic;
#[cfg(all(any(miri, portable_atomic_sanitize_thread), portable_atomic_new_atomic_intrinsics))]
#[cfg(target_arch = "aarch64")]
#[path = "atomic128/intrinsics.rs"]
mod aarch64;
#[cfg(not(all(
any(miri, portable_atomic_sanitize_thread),
portable_atomic_new_atomic_intrinsics
)))]
#[cfg(any(not(portable_atomic_no_asm), portable_atomic_nightly))]
#[cfg(target_arch = "aarch64")]
#[path = "atomic128/aarch64.rs"]
mod aarch64;
#[cfg(any(not(portable_atomic_no_asm), portable_atomic_nightly))]
#[cfg(any(
target_feature = "cmpxchg16b",
portable_atomic_target_feature = "cmpxchg16b",
portable_atomic_cmpxchg16b_dynamic
))]
#[cfg(target_arch = "x86_64")]
#[path = "atomic128/x86_64.rs"]
mod x86_64;
#[cfg(all(any(miri, portable_atomic_sanitize_thread), portable_atomic_llvm15))]
#[cfg(portable_atomic_asm_experimental_arch)]
#[cfg(any(
target_feature = "quadword-atomics",
portable_atomic_target_feature = "quadword-atomics"
))]
#[cfg(target_arch = "powerpc64")]
#[path = "atomic128/intrinsics.rs"]
mod powerpc64;
#[cfg(not(all(any(miri, portable_atomic_sanitize_thread), portable_atomic_llvm15)))]
#[cfg(portable_atomic_asm_experimental_arch)]
#[cfg(any(
target_feature = "quadword-atomics",
portable_atomic_target_feature = "quadword-atomics"
))]
#[cfg(target_arch = "powerpc64")]
#[path = "atomic128/powerpc64.rs"]
mod powerpc64;
#[cfg(portable_atomic_asm_experimental_arch)]
#[cfg(target_arch = "s390x")]
#[path = "atomic128/s390x.rs"]
mod s390x;
#[cfg(target_arch = "msp430")]
pub(crate) mod msp430;
#[cfg_attr(portable_atomic_no_cfg_target_has_atomic, cfg(any(test, portable_atomic_no_atomic_cas)))]
#[cfg_attr(
not(portable_atomic_no_cfg_target_has_atomic),
cfg(any(test, not(target_has_atomic = "ptr")))
)]
#[cfg(any(target_arch = "riscv32", target_arch = "riscv64"))]
mod riscv;
#[cfg(feature = "fallback")]
#[cfg(any(
test,
not(any(
all(any(not(portable_atomic_no_asm), portable_atomic_nightly), target_arch = "aarch64"),
all(
any(not(portable_atomic_no_asm), portable_atomic_nightly),
any(target_feature = "cmpxchg16b", portable_atomic_target_feature = "cmpxchg16b"),
target_arch = "x86_64",
),
all(
portable_atomic_asm_experimental_arch,
any(
target_feature = "quadword-atomics",
portable_atomic_target_feature = "quadword-atomics"
),
target_arch = "powerpc64"
),
all(portable_atomic_asm_experimental_arch, target_arch = "s390x"),
))
))]
#[cfg_attr(portable_atomic_no_cfg_target_has_atomic, cfg(not(portable_atomic_no_atomic_cas)))]
#[cfg_attr(not(portable_atomic_no_cfg_target_has_atomic), cfg(target_has_atomic = "ptr"))]
mod fallback;
#[cfg(any(
all(test, target_os = "none"),
portable_atomic_unsafe_assume_single_core,
target_arch = "avr",
target_arch = "msp430",
))]
#[cfg_attr(portable_atomic_no_cfg_target_has_atomic, cfg(any(test, portable_atomic_no_atomic_cas)))]
#[cfg_attr(
not(portable_atomic_no_cfg_target_has_atomic),
cfg(any(test, not(target_has_atomic = "ptr")))
)]
#[cfg(any(
portable_atomic_armv6m,
all(
target_arch = "arm",
not(any(target_feature = "v6", portable_atomic_target_feature = "v6"))
),
target_arch = "avr",
target_arch = "msp430",
target_arch = "riscv32",
target_arch = "riscv64",
))]
mod interrupt;
#[cfg_attr(
portable_atomic_no_cfg_target_has_atomic,
cfg(any(
not(portable_atomic_no_atomic_cas),
all(
not(portable_atomic_no_atomic_load_store),
not(portable_atomic_unsafe_assume_single_core)
)
))
)]
#[cfg_attr(
not(portable_atomic_no_cfg_target_has_atomic),
cfg(any(
target_has_atomic = "ptr",
all(
not(portable_atomic_no_atomic_load_store),
not(portable_atomic_unsafe_assume_single_core),
not(all(
any(target_arch = "riscv32", target_arch = "riscv64"),
not(target_has_atomic = "ptr")
))
)
))
)]
pub(crate) use self::core_atomic::{
AtomicBool, AtomicI16, AtomicI8, AtomicIsize, AtomicPtr, AtomicU16, AtomicU8, AtomicUsize,
};
#[cfg(not(portable_atomic_unsafe_assume_single_core))]
#[cfg(any(target_arch = "riscv32", target_arch = "riscv64"))]
#[cfg_attr(portable_atomic_no_cfg_target_has_atomic, cfg(portable_atomic_no_atomic_cas))]
#[cfg_attr(not(portable_atomic_no_cfg_target_has_atomic), cfg(not(target_has_atomic = "ptr")))]
pub(crate) use self::riscv::{
AtomicBool, AtomicI16, AtomicI8, AtomicIsize, AtomicPtr, AtomicU16, AtomicU8, AtomicUsize,
};
#[cfg(any(
portable_atomic_unsafe_assume_single_core,
target_arch = "avr",
target_arch = "msp430"
))]
#[cfg_attr(portable_atomic_no_cfg_target_has_atomic, cfg(portable_atomic_no_atomic_cas))]
#[cfg_attr(not(portable_atomic_no_cfg_target_has_atomic), cfg(not(target_has_atomic = "ptr")))]
pub(crate) use self::interrupt::{
AtomicBool, AtomicI16, AtomicI8, AtomicIsize, AtomicPtr, AtomicU16, AtomicU8, AtomicUsize,
};
#[cfg(not(target_pointer_width = "16"))]
#[cfg_attr(
portable_atomic_no_cfg_target_has_atomic,
cfg(any(
not(portable_atomic_no_atomic_cas),
all(
not(portable_atomic_no_atomic_load_store),
not(portable_atomic_unsafe_assume_single_core)
)
))
)]
#[cfg_attr(
not(portable_atomic_no_cfg_target_has_atomic),
cfg(any(
target_has_atomic = "ptr",
all(
not(portable_atomic_no_atomic_load_store),
not(portable_atomic_unsafe_assume_single_core),
not(all(
any(target_arch = "riscv32", target_arch = "riscv64"),
not(target_has_atomic = "ptr")
))
)
))
)]
pub(crate) use self::core_atomic::{AtomicI32, AtomicU32};
#[cfg(not(portable_atomic_unsafe_assume_single_core))]
#[cfg(any(target_arch = "riscv32", target_arch = "riscv64"))]
#[cfg_attr(portable_atomic_no_cfg_target_has_atomic, cfg(portable_atomic_no_atomic_cas))]
#[cfg_attr(not(portable_atomic_no_cfg_target_has_atomic), cfg(not(target_has_atomic = "ptr")))]
pub(crate) use self::riscv::{AtomicI32, AtomicU32};
#[cfg(any(not(target_pointer_width = "16"), feature = "fallback"))]
#[cfg(any(
portable_atomic_unsafe_assume_single_core,
target_arch = "avr",
target_arch = "msp430"
))]
#[cfg_attr(portable_atomic_no_cfg_target_has_atomic, cfg(portable_atomic_no_atomic_cas))]
#[cfg_attr(not(portable_atomic_no_cfg_target_has_atomic), cfg(not(target_has_atomic = "ptr")))]
pub(crate) use self::interrupt::{AtomicI32, AtomicU32};
#[cfg_attr(portable_atomic_no_cfg_target_has_atomic, cfg(not(portable_atomic_no_atomic_64)))]
#[cfg_attr(
not(portable_atomic_no_cfg_target_has_atomic),
cfg(any(
target_has_atomic = "64",
all(
not(any(target_pointer_width = "16", target_pointer_width = "32")),
not(portable_atomic_no_atomic_load_store),
not(portable_atomic_unsafe_assume_single_core),
not(all(
any(target_arch = "riscv32", target_arch = "riscv64"),
not(target_has_atomic = "ptr")
))
)
))
)]
pub(crate) use self::core_atomic::{AtomicI64, AtomicU64};
#[cfg(not(portable_atomic_unsafe_assume_single_core))]
#[cfg(target_arch = "riscv64")]
#[cfg_attr(portable_atomic_no_cfg_target_has_atomic, cfg(portable_atomic_no_atomic_cas))]
#[cfg_attr(not(portable_atomic_no_cfg_target_has_atomic), cfg(not(target_has_atomic = "ptr")))]
pub(crate) use self::riscv::{AtomicI64, AtomicU64};
#[cfg(feature = "fallback")]
#[cfg_attr(portable_atomic_no_cfg_target_has_atomic, cfg(portable_atomic_no_atomic_64))]
#[cfg_attr(not(portable_atomic_no_cfg_target_has_atomic), cfg(not(target_has_atomic = "64")))]
#[cfg_attr(portable_atomic_no_cfg_target_has_atomic, cfg(not(portable_atomic_no_atomic_cas)))]
#[cfg_attr(not(portable_atomic_no_cfg_target_has_atomic), cfg(target_has_atomic = "ptr"))]
pub(crate) use self::fallback::{AtomicI64, AtomicU64};
#[cfg(any(
not(any(target_pointer_width = "16", target_pointer_width = "32")),
feature = "fallback"
))]
#[cfg(any(
portable_atomic_unsafe_assume_single_core,
target_arch = "avr",
target_arch = "msp430"
))]
#[cfg_attr(portable_atomic_no_cfg_target_has_atomic, cfg(portable_atomic_no_atomic_cas))]
#[cfg_attr(not(portable_atomic_no_cfg_target_has_atomic), cfg(not(target_has_atomic = "ptr")))]
pub(crate) use self::interrupt::{AtomicI64, AtomicU64};
#[cfg(all(
any(not(portable_atomic_no_asm), portable_atomic_nightly),
target_arch = "aarch64"
))]
pub(crate) use self::aarch64::{AtomicI128, AtomicU128};
#[cfg(all(
any(not(portable_atomic_no_asm), portable_atomic_nightly),
any(
target_feature = "cmpxchg16b",
portable_atomic_target_feature = "cmpxchg16b",
portable_atomic_cmpxchg16b_dynamic
),
target_arch = "x86_64",
))]
pub(crate) use self::x86_64::{AtomicI128, AtomicU128};
#[cfg(portable_atomic_asm_experimental_arch)]
#[cfg(any(
target_feature = "quadword-atomics",
portable_atomic_target_feature = "quadword-atomics"
))]
#[cfg(target_arch = "powerpc64")]
pub(crate) use self::powerpc64::{AtomicI128, AtomicU128};
#[cfg(portable_atomic_asm_experimental_arch)]
#[cfg(target_arch = "s390x")]
pub(crate) use self::s390x::{AtomicI128, AtomicU128};
#[cfg(feature = "fallback")]
#[cfg(not(any(
all(any(not(portable_atomic_no_asm), portable_atomic_nightly), target_arch = "aarch64"),
all(
any(not(portable_atomic_no_asm), portable_atomic_nightly),
any(
target_feature = "cmpxchg16b",
portable_atomic_target_feature = "cmpxchg16b",
portable_atomic_cmpxchg16b_dynamic
),
target_arch = "x86_64",
),
all(
portable_atomic_asm_experimental_arch,
any(
target_feature = "quadword-atomics",
portable_atomic_target_feature = "quadword-atomics"
),
target_arch = "powerpc64"
),
all(portable_atomic_asm_experimental_arch, target_arch = "s390x"),
)))]
#[cfg_attr(portable_atomic_no_cfg_target_has_atomic, cfg(not(portable_atomic_no_atomic_cas)))]
#[cfg_attr(not(portable_atomic_no_cfg_target_has_atomic), cfg(target_has_atomic = "ptr"))]
pub(crate) use self::fallback::{AtomicI128, AtomicU128};
#[cfg(feature = "fallback")]
#[cfg(any(
portable_atomic_unsafe_assume_single_core,
target_arch = "avr",
target_arch = "msp430"
))]
#[cfg_attr(portable_atomic_no_cfg_target_has_atomic, cfg(portable_atomic_no_atomic_cas))]
#[cfg_attr(not(portable_atomic_no_cfg_target_has_atomic), cfg(not(target_has_atomic = "ptr")))]
pub(crate) use self::interrupt::{AtomicI128, AtomicU128};