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

Function atomic_clear_64

freebsd/mips/include/atomic.h:207–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205}
206
207static __inline void
208atomic_clear_64(__volatile uint64_t *p, uint64_t v)
209{
210 uint64_t temp;
211 v = ~v;
212
213 __asm __volatile (
214 "1:\n\t"
215 "lld %0, %3\n\t" /* load old value */
216 "and %0, %2, %0\n\t" /* calculate new value */
217 "scd %0, %1\n\t" /* attempt to store */
218 "beqz %0, 1b\n\t" /* spin if failed */
219 : "=&r" (temp), "=m" (*p)
220 : "r" (v), "m" (*p)
221 : "memory");
222}
223
224static __inline void
225atomic_add_64(__volatile uint64_t *p, uint64_t v)

Callers 1

vm_page_bits_clearFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected