iceoryx icon indicating copy to clipboard operation
iceoryx copied to clipboard

32-Bit Support

Open elBoberido opened this issue 1 month ago • 0 comments

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

  • 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

Additional information

Tasks

  • [ ] 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
  • [ ] Adjust the UsedChunkList
  • [ ] Fix all warnings on 32 Bit

Related issues

  • #562

elBoberido avatar Jun 05 '24 18:06 elBoberido