aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/common/src/atomic_win32.h
diff options
context:
space:
mode:
authorGravatar bunnei <ericbunnie@gmail.com>2014-04-01 18:20:08 -0400
committerGravatar bunnei <ericbunnie@gmail.com>2014-04-01 18:48:08 -0400
commitc9b5b89e21ba9ea844bfd5407bfe42f35076a35e (patch)
tree9ed57547ae2330aec9296b484393fa70e057c5b6 /src/common/src/atomic_win32.h
parent4860480c365710a0a788d3853558726c1ee28c82 (diff)
convert tabs to spaces
Diffstat (limited to 'src/common/src/atomic_win32.h')
-rw-r--r--src/common/src/atomic_win32.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/common/src/atomic_win32.h b/src/common/src/atomic_win32.h
index 31ee0b78..760b16d4 100644
--- a/src/common/src/atomic_win32.h
+++ b/src/common/src/atomic_win32.h
@@ -31,40 +31,40 @@ namespace Common
{
inline void AtomicAdd(volatile u32& target, u32 value) {
- InterlockedExchangeAdd((volatile LONG*)&target, (LONG)value);
+ InterlockedExchangeAdd((volatile LONG*)&target, (LONG)value);
}
inline void AtomicAnd(volatile u32& target, u32 value) {
- _InterlockedAnd((volatile LONG*)&target, (LONG)value);
+ _InterlockedAnd((volatile LONG*)&target, (LONG)value);
}
inline void AtomicIncrement(volatile u32& target) {
- InterlockedIncrement((volatile LONG*)&target);
+ InterlockedIncrement((volatile LONG*)&target);
}
inline void AtomicDecrement(volatile u32& target) {
- InterlockedDecrement((volatile LONG*)&target);
+ InterlockedDecrement((volatile LONG*)&target);
}
inline u32 AtomicLoad(volatile u32& src) {
- return src; // 32-bit reads are always atomic.
+ return src; // 32-bit reads are always atomic.
}
inline u32 AtomicLoadAcquire(volatile u32& src) {
- u32 result = src; // 32-bit reads are always atomic.
- _ReadBarrier(); // Compiler instruction only. x86 loads always have acquire semantics.
- return result;
+ u32 result = src; // 32-bit reads are always atomic.
+ _ReadBarrier(); // Compiler instruction only. x86 loads always have acquire semantics.
+ return result;
}
inline void AtomicOr(volatile u32& target, u32 value) {
- _InterlockedOr((volatile LONG*)&target, (LONG)value);
+ _InterlockedOr((volatile LONG*)&target, (LONG)value);
}
inline void AtomicStore(volatile u32& dest, u32 value) {
- dest = value; // 32-bit writes are always atomic.
+ dest = value; // 32-bit writes are always atomic.
}
inline void AtomicStoreRelease(volatile u32& dest, u32 value) {
- _WriteBarrier(); // Compiler instruction only. x86 stores always have release semantics.
- dest = value; // 32-bit writes are always atomic.
+ _WriteBarrier(); // Compiler instruction only. x86 stores always have release semantics.
+ dest = value; // 32-bit writes are always atomic.
}
}