Skip to content

Commit

Permalink
[eclipse-iceoryx#401] Use lock-free atomics on 32-bit architectures
Browse files Browse the repository at this point in the history
  • Loading branch information
elBoberido committed Sep 27, 2024
1 parent da1ec61 commit c0f8c59
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions iceoryx2-pal/concurrency-sync/src/iox_atomic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,30 +55,14 @@ pub type IoxAtomicI16 = core::sync::atomic::AtomicI16;
#[allow(clippy::disallowed_types)]
pub type IoxAtomicI32 = core::sync::atomic::AtomicI32;

#[cfg(all(
target_pointer_width = "64",
not(feature = "enforce_32bit_rwlock_atomic")
))]
/// Behaves like [`core::sync::atomic::AtomicI64`]
#[allow(clippy::disallowed_types)]
pub type IoxAtomicI64 = core::sync::atomic::AtomicI64;

#[cfg(all(
target_pointer_width = "64",
not(feature = "enforce_32bit_rwlock_atomic")
))]
/// Behaves like [`core::sync::atomic::AtomicU64`]
#[allow(clippy::disallowed_types)]
pub type IoxAtomicU64 = core::sync::atomic::AtomicU64;

#[cfg(any(target_pointer_width = "32", feature = "enforce_32bit_rwlock_atomic"))]
/// Non lock-free implementation that behaves like [`core::sync::atomic::AtomicI64`]
pub type IoxAtomicI64 = IoxAtomic<i64>;

#[cfg(any(target_pointer_width = "32", feature = "enforce_32bit_rwlock_atomic"))]
/// Non lock-free implementation that behaves like [`core::sync::atomic::AtomicU64`]
pub type IoxAtomicU64 = IoxAtomic<u64>;

type LockType = RwLockWriterPreference;

#[doc(hidden)]
Expand Down

0 comments on commit c0f8c59

Please sign in to comment.