MCPcopy Create free account
hub / github.com/F-Stack/f-stack / atomic_clear_32

Function atomic_clear_32

freebsd/arm/include/atomic-v6.h:141–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139ATOMIC_ACQ_REL_LONG(add)
140
141static __inline void
142atomic_clear_32(volatile uint32_t *address, uint32_t setmask)
143{
144 uint32_t tmp = 0, tmp2 = 0;
145
146 __asm __volatile(
147 "1: ldrex %0, [%2] \n"
148 " bic %0, %0, %3 \n"
149 " strex %1, %0, [%2] \n"
150 " cmp %1, #0 \n"
151 " it ne \n"
152 " bne 1b \n"
153 : "=&r" (tmp), "+r" (tmp2), "+r" (address), "+r" (setmask)
154 : : "cc", "memory");
155}
156
157static __inline void
158atomic_clear_64(volatile uint64_t *p, uint64_t val)

Callers 1

atomic_clear_longFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected