[iar]修复__LDREX 和 __STREX 报 declared implicitly 警告

related: https://github.com/RT-Thread/rt-thread/issues/7381
This commit is contained in:
Meco Man 2023-09-19 14:23:19 -04:00 committed by guo
parent 092b52ab24
commit 47a3139b63
1 changed files with 2 additions and 1 deletions

View File

@ -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)