Skip to content

Commit

Permalink
ESP-IDF targets' 64-bit atomics are not lock-free
Browse files Browse the repository at this point in the history
cc #122
  • Loading branch information
taiki-e committed Sep 24, 2023
1 parent bf8aa1d commit e8b489f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/imp/core_atomic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,11 @@ macro_rules! atomic_int {
}
#[inline]
pub(crate) const fn is_always_lock_free() -> bool {
true
// https://github.com/rust-lang/rust/pull/115577#issuecomment-1732259297
cfg!(not(all(
any(target_arch = "riscv32", target_arch = "xtensa"),
target_os = "espidf",
))) | (core::mem::size_of::<$int_type>() < 8)
}
#[inline]
pub(crate) fn get_mut(&mut self) -> &mut $int_type {
Expand Down

0 comments on commit e8b489f

Please sign in to comment.