Open elBoberido opened 10 months ago
@budrus @elfenpiff @FerdinandSpitzschnueffler @mossmaurice @MatthiasKillat @dkroenke any objections to the proposed refactoring of the platform? It would be part of a 4.0 release and nothing in the short term but we might make it a prerequisite for Android support.
Brief feature description
Currently one needs to provide all headers for all platform, even if they are simply forwarding to the system header. This can be simplified by the C++17 feature
__has_include
Detailed information
The platform would provide a generic implementation of the header. If the specific platform does not provide a custoom header, the generic one would be used.
This is an example for
iceoryx_platform/include/iox/platform/semaphor.hpp
The generic implementation in
iceoryx_platform/generic/include/iox/platform/generic/semaphore.hpp
would look like thisFor Linux, Unix, QNX and potentially other POSIX operating systems it would work out of the box.
FreeRTOS would specify a
iceoryx_platform/freertos/include/iox/platform/override/semaphore.hpp
header and partially reuse the generic headerWindows (and macOS) would have a full re-implementation in
iceoryx_platform/windows/iox/platform/override/semaphore.hpp
To use an out-of-tree platform one just needs to specify the path to
iceoryx_platform/os/
like it is nowadays but it would be much simpler to add an maintain a platform which is mostly compatible with the generic platform.Tasks
website/advanced/custom-iceoryx-platform.md