Fix define MBED_EXCLUSIVE_ACCESS for Apple M1 (ARM64) computers

The new Apple M1 Mac computers are ARM based. When compiling and running
unit tests on an M1 Mac, the architecture is defined as __arm__

An extra check for __aarch64__ is needed to set MBED_EXCLUSIVE_ACCESS to 0U for the M1
Mac

If not, compilation fails with "Unknown ARM architecture for exclusive access" error
pull/14456/head
Ladislas de Toldi 2021-03-23 11:42:00 +01:00
parent 96e19afdd1
commit f80ed5ef3e
No known key found for this signature in database
GPG Key ID: C5241848279CD797
1 changed files with 2 additions and 0 deletions

View File

@ -88,6 +88,8 @@ typedef enum mbed_memory_order {
#endif
#elif (__ARM_ARCH_6M__ == 1U)
#define MBED_EXCLUSIVE_ACCESS 0U
#elif defined __aarch64__ // Apple M1 Mac
#define MBED_EXCLUSIVE_ACCESS 0U
#else
#error "Unknown ARM architecture for exclusive access"
#endif // __ARM_ARCH_xxx