Support using a priority inheritance protocol #3356
Closed
+211
−56
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Provides initial support for utilizing a priority inheritance protocol for mutexes if supported by the threading library. Developers can opt to build with
SPDLOG_PRIORITY_INHERITANCE
enabled to help avoid priority inversion scenarios.The following change set is being proposed to help the spdlog framework to be better equip for (near) real-time applications. I was asked about a suggested logging framework to use for a C++ application and recommended spdlog; however, I was told by others that they could not use it since the risk of priority inversion scenarios with the use of the standard library's mutex implementations. This spawned this change set by adding support for priority inheritance for environments that support such a capability. At this time, this only brings support for Linux gcc/clang environments (as least, that is all that has been tested with).
If such a change is not desired in the logging framework, no worries.