mirror of https://github.com/ARMmbed/mbed-os.git
Protect local static object construction in ARMCC
Implement the functions __cxa_guard_acquire, __cxa_guard_release and __cxa_guard_abort for ARMCC so local static object construction is thread safe.pull/5738/head
parent
e97b38f804
commit
0493ba2bfe
|
@ -977,6 +977,10 @@ extern "C" void __env_unlock( struct _reent *_r )
|
||||||
__rtos_env_unlock(_r);
|
__rtos_env_unlock(_r);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined (__GNUC__) || defined(__CC_ARM) || (defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||||
|
|
||||||
#define CXA_GUARD_INIT_DONE (1 << 0)
|
#define CXA_GUARD_INIT_DONE (1 << 0)
|
||||||
#define CXA_GUARD_INIT_IN_PROGRESS (1 << 1)
|
#define CXA_GUARD_INIT_IN_PROGRESS (1 << 1)
|
||||||
#define CXA_GUARD_MASK (CXA_GUARD_INIT_DONE | CXA_GUARD_INIT_IN_PROGRESS)
|
#define CXA_GUARD_MASK (CXA_GUARD_INIT_DONE | CXA_GUARD_INIT_IN_PROGRESS)
|
||||||
|
|
Loading…
Reference in New Issue