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

Function atomic_set_32

freebsd/mips/include/atomic.h:93–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91static __inline int atomic_fcmpset_16(__volatile uint16_t *, uint16_t *, uint16_t);
92
93static __inline void
94atomic_set_32(__volatile uint32_t *p, uint32_t v)
95{
96 uint32_t temp;
97
98 __asm __volatile (
99 "1:\tll %0, %3\n\t" /* load old value */
100 "or %0, %2, %0\n\t" /* calculate new value */
101 "sc %0, %1\n\t" /* attempt to store */
102 "beqz %0, 1b\n\t" /* spin if failed */
103 : "=&r" (temp), "=m" (*p)
104 : "r" (v), "m" (*p)
105 : "memory");
106
107}
108
109static __inline void
110atomic_clear_32(__volatile uint32_t *p, uint32_t v)

Callers 4

ieee80211_com_vdetachFunction · 0.50
ipi_sendFunction · 0.50
vm_page_bits_setFunction · 0.50
vm_page_aflag_setFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected