iceoryx
iceoryx copied to clipboard
32-Bit Support
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
- x86-64
- x86-64 with '-m32' flag
- arm64 with '-mtune=cortex-a53' flag
- arm64 with '-mtune=cortex-a53 -mabi=lp64' flags
- arm64 with '-mtune=cortex-a53 -mabi=ilp32' flags
- arm with '-mtune=cortex-a53' flag
- arm with '-mtune=cortex-r5' flag
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 thanuint64_t
on 32 bit
Additional information
Tasks
- [ ] Use the C++17
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 lock - [ ] Adjust the
UsedChunkList
- [ ] Fix all warnings on 32 Bit
Related issues
- #562