25 __asm__
volatile (
"dmb");
29#if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__)
34 __asm__
volatile (
"ldrex %0, [%1]" :
"=r" (res) :
"r" (addr));
38uint32_t
__strex(uint32_t val,
volatile uint32_t *addr)
41 __asm__
volatile (
"strex %0, %2, [%1]"
42 :
"=&r" (res) :
"r" (addr),
"r" (val));
uint32_t mutex_trylock(mutex_t *m)
void mutex_lock(mutex_t *m)
uint32_t __strex(uint32_t val, volatile uint32_t *addr)
uint32_t __ldrex(volatile uint32_t *addr)
void mutex_unlock(mutex_t *m)