blob: 055cbf6fbd766cbdf4865482dc3b8e093f2c022f [file] [log] [blame]
#include <intrin.h>
__int64 _InterlockedExchange64(__int64 volatile *Target, __int64 Value)
{
__asm__ __volatile("lock ; xchgq %0,%1"
: "=r"(Value)
: "m"(*Target),"0"(Value)
: "memory");
return Value;
}
__int64 InterlockedExchange64(__int64 volatile *, __int64) __attribute__((alias("_InterlockedExchange64")));