File tree 1 file changed +20
-1
lines changed 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change 24
24
#include "platform/mbed_critical.h"
25
25
#include "platform/mbed_toolchain.h"
26
26
27
+ // if __EXCLUSIVE_ACCESS rtx macro not defined, we need to get this via own-set architecture macros
28
+ #ifndef MBED_EXCLUSIVE_ACCESS
29
+ #ifndef __EXCLUSIVE_ACCESS
30
+ #if ((__ARM_ARCH_7M__ == 1U ) || \
31
+ (__ARM_ARCH_7EM__ == 1U ) || \
32
+ (__ARM_ARCH_8M_BASE__ == 1U ) || \
33
+ (__ARM_ARCH_8M_MAIN__ == 1U )) || \
34
+ (__ARM_ARCH_7A__ == 1U )
35
+ #define MBED_EXCLUSIVE_ACCESS 1U
36
+ #elif (__ARM_ARCH_6M__ == 1U )
37
+ #define MBED_EXCLUSIVE_ACCESS 0U
38
+ #else
39
+ #error "Unknown architecture for exclusive access"
40
+ #endif
41
+ #else
42
+ #define MBED_EXCLUSIVE_ACCESS __EXCLUSIVE_ACCESS
43
+ #endif
44
+ #endif
45
+
27
46
static volatile uint32_t critical_section_reentrancy_counter = 0 ;
28
47
29
48
bool core_util_are_interrupts_enabled (void )
@@ -90,7 +109,7 @@ void core_util_critical_section_exit(void)
90
109
}
91
110
}
92
111
93
- #if __EXCLUSIVE_ACCESS
112
+ #if MBED_EXCLUSIVE_ACCESS
94
113
95
114
/* Supress __ldrex and __strex deprecated warnings - "#3731-D: intrinsic is deprecated" */
96
115
#if defined (__CC_ARM )
You can’t perform that action at this time.
0 commit comments