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

Function atomic_swap_long

freebsd/mips/include/atomic.h:821–832  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

819
820#ifdef __mips_n64
821static __inline unsigned long
822atomic_swap_long(volatile unsigned long *ptr, const unsigned long value)
823{
824 unsigned long retval;
825
826 retval = *ptr;
827
828 while (!atomic_fcmpset_64((volatile uint64_t *)ptr,
829 (uint64_t *)&retval, value))
830 ;
831 return (retval);
832}
833#else
834static __inline unsigned long
835atomic_swap_long(volatile unsigned long *ptr, const unsigned long value)

Callers

nothing calls this directly

Calls 2

atomic_fcmpset_64Function · 0.70
atomic_fcmpset_32Function · 0.70

Tested by

no test coverage detected