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

Function atomic_fcmpset_16

freebsd/sys/_atomic_subword.h:163–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

161
162#ifndef atomic_fcmpset_16
163static __inline int
164atomic_fcmpset_16(__volatile uint16_t *addr, uint16_t *old, uint16_t val)
165{
166 int ret, shift;
167 uint32_t wold;
168
169 shift = _ATOMIC_HWORD_SHIFT(addr);
170 wold = *old << shift;
171 ret = _atomic_fcmpset_masked_word(_ATOMIC_WORD_ALIGNED(addr),
172 &wold, val << shift, 0xffff << shift);
173 if (ret == 0)
174 *old = (wold >> shift) & 0xffff;
175 return (ret);
176}
177#endif
178
179#ifndef atomic_load_acq_8

Callers 1

vm_page_bits_swapFunction · 0.85

Calls 1

Tested by

no test coverage detected