diff --git a/include/etl/debug_count.h b/include/etl/debug_count.h index ee606528..1a486490 100644 --- a/include/etl/debug_count.h +++ b/include/etl/debug_count.h @@ -35,6 +35,7 @@ SOFTWARE. #include #include "platform.h" +#include "atomic.h" ///\defgroup debug_count debug count ///\ingroup utilities @@ -111,7 +112,11 @@ namespace etl private: +#if ETL_HAS_ATOMIC + etl::atomic_int32_t count; +#else int32_t count; +#endif }; } diff --git a/support/Release notes.txt b/support/Release notes.txt index 6c5c62ca..66de7620 100644 --- a/support/Release notes.txt +++ b/support/Release notes.txt @@ -8,6 +8,7 @@ etl::swap is now ETL_CONSTEXPR14. Changed ETL_ENDIANNESS_IS_CONSTEXPR to ETL_HAS_CONSTEXPR_ENDIANNESS. Changed ETL_CONSTEXPR17 to ETL_CONSTEXPR14 for reverse iterators Added template wrappers around memcpy, memmove, memcmp, memset& memchr. +The counter in etl::debug_count is atomic, if available. =============================================================================== 20.25.0