diff --git a/doc/release-notes/iceoryx2-unreleased.md b/doc/release-notes/iceoryx2-unreleased.md index 877cac817..6b6250db4 100644 --- a/doc/release-notes/iceoryx2-unreleased.md +++ b/doc/release-notes/iceoryx2-unreleased.md @@ -18,6 +18,10 @@ [#1289](https://github.com/eclipse-iceoryx/iceoryx2/issues/1289) * Add source `NodeId` to request and response header [#1308](https://github.com/eclipse-iceoryx/iceoryx2/issues/1308) +* Add source `NodeId` to request and response header + [#1308](https://github.com/eclipse-iceoryx/iceoryx2/issues/1308) +* Add support for platforms that do not support 64-bit atomics + [#1324](https://github.com/eclipse-iceoryx/iceoryx2/issues/1324) ### Bugfixes diff --git a/iceoryx2-pal/concurrency-sync/src/atomic.rs b/iceoryx2-pal/concurrency-sync/src/atomic.rs index d34260178..f208540d7 100644 --- a/iceoryx2-pal/concurrency-sync/src/atomic.rs +++ b/iceoryx2-pal/concurrency-sync/src/atomic.rs @@ -104,18 +104,32 @@ pub type AtomicI32 = core::sync::atomic::AtomicI32; pub type AtomicI32 = loom::sync::atomic::AtomicI32; /// Behaves like [`core::sync::atomic::AtomicI64`] -#[cfg(not(all(test, loom, feature = "std")))] +#[cfg(all(not(all(test, loom, feature = "std")), target_has_atomic = "64"))] #[allow(clippy::disallowed_types)] pub type AtomicI64 = core::sync::atomic::AtomicI64; +#[cfg(all(not(all(test, loom, feature = "std")), not(target_has_atomic = "64")))] +#[deprecated( + since = "0.0.1", + note = "This platform does not support native atomic 64-bit operations! iceoryx2 uses a 64-bit atomic based on spinlocks that cannot guarantee lock-free operations. A crash in one process may cause a deadlock in another process." +)] +pub type AtomicI64 = Atomic; + #[cfg(all(test, loom, feature = "std"))] pub type AtomicI64 = loom::sync::atomic::AtomicI64; /// Behaves like [`core::sync::atomic::AtomicU64`] -#[cfg(not(all(test, loom, feature = "std")))] +#[cfg(all(not(all(test, loom, feature = "std")), target_has_atomic = "64"))] #[allow(clippy::disallowed_types)] pub type AtomicU64 = core::sync::atomic::AtomicU64; +#[cfg(all(not(all(test, loom, feature = "std")), not(target_has_atomic = "64")))] +#[deprecated( + since = "0.0.1", + note = "This platform does not support native atomic 64-bit operations! iceoryx2 uses a 64-bit atomic based on spinlocks that cannot guarantee lock-free operations. A crash in one process may cause a deadlock in another process." +)] +pub type AtomicU64 = Atomic; + #[cfg(all(test, loom, feature = "std"))] pub type AtomicU64 = loom::sync::atomic::AtomicU64;