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

Function atomic_swap_int

freebsd/i386/include/atomic.h:731–741  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

729#ifdef __GNUCLIKE_ASM
730
731static __inline u_int
732atomic_swap_int(volatile u_int *p, u_int v)
733{
734
735 __asm __volatile(
736 " xchgl %1,%0 ; "
737 "# atomic_swap_int"
738 : "+r" (v), /* 0 */
739 "+m" (*p)); /* 1 */
740 return (v);
741}
742
743static __inline u_long
744atomic_swap_long(volatile u_long *p, u_long v)

Callers 3

atomic_swap_longFunction · 0.70
futex_xchgl_slow0Function · 0.50
vm_page_busy_freeFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected