[iar]修复__LDREX 和 __STREX 报 declared implicitly 警告
related: https://github.com/RT-Thread/rt-thread/issues/7381
This commit is contained in:
parent
092b52ab24
commit
47a3139b63
|
@ -12,6 +12,7 @@
|
|||
|
||||
#if defined (__IAR_SYSTEMS_ICC__) /* for IAR Compiler */
|
||||
#include <intrinsics.h>
|
||||
#include <iccarm_builtin.h>
|
||||
#endif
|
||||
/**
|
||||
\brief LDR Exclusive (32 bit)
|
||||
|
@ -30,7 +31,7 @@
|
|||
#elif defined (__IAR_SYSTEMS_ICC__) /* for IAR Compiler */
|
||||
_Pragma("inline=forced") __intrinsic rt_atomic_t __LDREXW(volatile rt_atomic_t *ptr)
|
||||
{
|
||||
return __LDREX((unsigned int *)ptr);
|
||||
return __iar_builtin_LDREX((volatile unsigned int *)ptr);
|
||||
}
|
||||
#elif defined (__GNUC__) /* GNU GCC Compiler */
|
||||
__attribute__((always_inline)) static inline rt_atomic_t __LDREXW(volatile rt_atomic_t *addr)
|
||||
|
|
Loading…
Reference in New Issue