30 #ifndef V8_ATOMICOPS_INTERNALS_X86_MSVC_H_
31 #define V8_ATOMICOPS_INTERNALS_X86_MSVC_H_
42 LONG result = InterlockedCompareExchange(
43 reinterpret_cast<volatile LONG*>(ptr),
44 static_cast<LONG>(new_value),
45 static_cast<LONG>(old_value));
46 return static_cast<Atomic32>(result);
51 LONG result = InterlockedExchange(
52 reinterpret_cast<volatile LONG*>(ptr),
53 static_cast<LONG>(new_value));
54 return static_cast<Atomic32>(result);
59 return InterlockedExchangeAdd(
60 reinterpret_cast<volatile LONG*>(ptr),
61 static_cast<LONG>(increment)) + increment;
69 #if !(defined(_MSC_VER) && _MSC_VER >= 1400)
70 #error "We require at least vs2005 for MemoryBarrier"
125 Atomic64 new_value) {
126 PVOID result = InterlockedCompareExchangePointer(
127 reinterpret_cast<volatile PVOID*>(ptr),
128 reinterpret_cast<PVOID>(new_value), reinterpret_cast<PVOID>(old_value));
129 return reinterpret_cast<Atomic64
>(result);
133 Atomic64 new_value) {
134 PVOID result = InterlockedExchangePointer(
135 reinterpret_cast<volatile PVOID*>(ptr),
136 reinterpret_cast<PVOID>(new_value));
137 return reinterpret_cast<Atomic64
>(result);
141 Atomic64 increment) {
142 return InterlockedExchangeAdd64(
143 reinterpret_cast<volatile LONGLONG*>(ptr),
144 static_cast<LONGLONG>(increment)) + increment;
148 Atomic64 increment) {
156 inline void Acquire_Store(
volatile Atomic64* ptr, Atomic64 value) {
161 inline void Release_Store(
volatile Atomic64* ptr, Atomic64 value) {
176 inline Atomic64
Acquire_Load(
volatile const Atomic64* ptr) {
177 Atomic64 value = *ptr;
181 inline Atomic64
Release_Load(
volatile const Atomic64* ptr) {
188 Atomic64 new_value) {
194 Atomic64 new_value) {
199 #endif // defined(_WIN64)
203 #endif // V8_ATOMICOPS_INTERNALS_X86_MSVC_H_
void Acquire_Store(volatile Atomic32 *ptr, Atomic32 value)
typedef PVOID(__stdcall *DLL_FUNC_TYPE(SymFunctionTableAccess64))(HANDLE hProcess
Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32 *ptr, Atomic32 old_value, Atomic32 new_value)
Atomic32 Release_CompareAndSwap(volatile Atomic32 *ptr, Atomic32 old_value, Atomic32 new_value)
void NoBarrier_Store(volatile Atomic32 *ptr, Atomic32 value)
Atomic32 NoBarrier_AtomicExchange(volatile Atomic32 *ptr, Atomic32 new_value)
STATIC_ASSERT((FixedDoubleArray::kHeaderSize &kDoubleAlignmentMask)==0)
Atomic32 Release_Load(volatile const Atomic32 *ptr)
Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32 *ptr, Atomic32 increment)
void Release_Store(volatile Atomic32 *ptr, Atomic32 value)
Atomic32 Barrier_AtomicIncrement(volatile Atomic32 *ptr, Atomic32 increment)
Atomic32 NoBarrier_Load(volatile const Atomic32 *ptr)
Atomic32 Acquire_Load(volatile const Atomic32 *ptr)
Atomic32 Acquire_CompareAndSwap(volatile Atomic32 *ptr, Atomic32 old_value, Atomic32 new_value)