The main reason iceoryx is not running on 32-Bit CPUs are the lock-free algorithms. Our implementations rely on 8 byte (64 bit) CAS operations being lock-free. However, currently available 32bit CPUs often support 8 byte CAS.
The UsedChunkList stores its data as 64 bit values and uses an atomic flag for synchronization for RouDi in case an application dies. With 32 bit CPUs this can lead to torn writes. These torn writes need to be detected when RouDi cleans up the remainder of a dead process.
There are a ton on warnings, e.g. usize_t is smaller than uint64_t on 32 bit
[ ] Use the C++17 std::atomic<T>::is_always_lock_free in all lock-free algorithms with a static_assert to prevent compilation on targets which do not support the atomic data type without a process local lock
Brief feature description
The main reason iceoryx is not running on 32-Bit CPUs are the lock-free algorithms. Our implementations rely on 8 byte (64 bit) CAS operations being lock-free. However, currently available 32bit CPUs often support 8 byte CAS.
The goal is to get iceoryx running on the Kria KR260 Robotics Starter Kit
Detailed information
godbolt example with 64 bit data type
Additional hurdles
UsedChunkList
stores its data as 64 bit values and uses an atomic flag for synchronization for RouDi in case an application dies. With 32 bit CPUs this can lead to torn writes. These torn writes need to be detected when RouDi cleans up the remainder of a dead process.usize_t
is smaller thanuint64_t
on 32 bitAdditional information
Tasks
std::atomic<T>::is_always_lock_free
in all lock-free algorithms with astatic_assert
to prevent compilation on targets which do not support the atomic data type without a process local lockUsedChunkList
Related issues
562