#pragma once
#include_next <windows.h>

#ifndef _MSC_VER
extern "C" inline char InterlockedExchange8(volatile char* aTarget, char aValue)
{
    return __atomic_exchange_n(aTarget, aValue, __ATOMIC_SEQ_CST);
}

extern "C" inline char _InterlockedExchangeAdd8(volatile char* aTarget, char aValue)
{
    return __atomic_fetch_add(aTarget, aValue, __ATOMIC_SEQ_CST);
}
#endif
