-
Notifications
You must be signed in to change notification settings - Fork 369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify platform abstraction #2107
Labels
refactoring
Refactor code without adding features
Projects
Comments
@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. |
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The text was updated successfully, but these errors were encountered: