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

Function atomic_fcmpset_8

freebsd/sys/_atomic_subword.h:133–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131
132#ifndef atomic_fcmpset_8
133static __inline int
134atomic_fcmpset_8(__volatile uint8_t *addr, uint8_t *old, uint8_t val)
135{
136 int ret, shift;
137 uint32_t wold;
138
139 shift = _ATOMIC_BYTE_SHIFT(addr);
140 wold = *old << shift;
141 ret = _atomic_fcmpset_masked_word(_ATOMIC_WORD_ALIGNED(addr),
142 &wold, val << shift, 0xff << shift);
143 if (ret == 0)
144 *old = (wold >> shift) & 0xff;
145 return (ret);
146}
147#endif
148
149#ifndef atomic_cmpset_16

Callers 2

cache_neg_hit_prepFunction · 0.85
vm_page_bits_swapFunction · 0.85

Calls 1

Tested by

no test coverage detected