Automatically set ETL_HAS_ATOMIC if __STDC_NO_ATOMICS__ defined by compiler. (#624)

Reference: https://en.cppreference.com/w/c/atomic

Co-authored-by: Jeremy Erdmann <jeremy.erdmann@millerwelds.com>
This commit is contained in:
jeremyerdmann 2022-10-18 12:30:48 -05:00 committed by GitHub
parent c1d73a7a93
commit 93d9df9c9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -344,7 +344,8 @@ SOFTWARE.
// Determine if the ETL should support atomics.
#if defined(ETL_NO_ATOMICS) || \
defined(ETL_TARGET_DEVICE_ARM_CORTEX_M0) || \
defined(ETL_TARGET_DEVICE_ARM_CORTEX_M0_PLUS)
defined(ETL_TARGET_DEVICE_ARM_CORTEX_M0_PLUS) || \
defined(__STDC_NO_ATOMICS__)
#define ETL_HAS_ATOMIC 0
#else
#if ((ETL_USING_CPP11 && (ETL_USING_STL || defined(ETL_IN_UNIT_TEST))) || \