blob: 406b770881ee8c68c64bcffec6bd97a70be24f36 [file] [log] [blame]
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
LONG64 InterlockedExchange64(LONG64 volatile *Target,LONG64 Value)
{
__asm__ __volatile("lock ; xchgq %0,%1"
: "=r"(Value)
: "m"(*Target),"0"(Value)
: "memory");
return Value;
}