diff --git a/libs/libc/machine/arch_atomic.c b/libs/libc/machine/arch_atomic.c index 0db93e79b2ea2..fef258e718a05 100644 --- a/libs/libc/machine/arch_atomic.c +++ b/libs/libc/machine/arch_atomic.c @@ -753,17 +753,15 @@ SYNC_VAL_CMP_SWAP(4, uint32_t) SYNC_VAL_CMP_SWAP(8, uint64_t) -#endif /* __clang__ */ - -#ifdef __ghs__ - /**************************************************************************** * Name: __sync_synchronize ****************************************************************************/ void weak_function __sync_synchronize(void) { - asm volatile("" ::: "memory"); +#ifdef SP_DMB + SP_DMB(); +#endif } -#endif +#endif /* __clang__ */