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