diff options
author | Haru <haru@dotalux.com> | 2014-11-16 06:35:51 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2014-11-16 07:16:23 +0100 |
commit | 02fcaed6bd32b0ffbc4f03b8f9de6f0720e6253f (patch) | |
tree | 3161fd5786bb563c32059068eb3b4876d2ae11ca /src/common/atomic.h | |
parent | 31bff051ee3c353fb7ee5e544d68feeaefd4941f (diff) | |
download | hercules-02fcaed6bd32b0ffbc4f03b8f9de6f0720e6253f.tar.gz hercules-02fcaed6bd32b0ffbc4f03b8f9de6f0720e6253f.tar.bz2 hercules-02fcaed6bd32b0ffbc4f03b8f9de6f0720e6253f.tar.xz hercules-02fcaed6bd32b0ffbc4f03b8f9de6f0720e6253f.zip |
Whitespace cleanup (no code changes)
This includes, and is not limited to: mixed or wrong indentation, excess
whitespace (horizontal and vertical), misalignment, trailing spaces.
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/common/atomic.h')
-rw-r--r-- | src/common/atomic.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/common/atomic.h b/src/common/atomic.h index e73b1c464..a42dfad1c 100644 --- a/src/common/atomic.h +++ b/src/common/atomic.h @@ -8,9 +8,9 @@ // (Interlocked CompareExchange, Add .. and so on ..) // // Implementation varies / depends on: -// - Architecture -// - Compiler -// - Operating System +// - Architecture +// - Compiler +// - Operating System // // our Abstraction is fully API-Compatible to Microsoft's implementation @ NT5.0+ // @@ -29,13 +29,13 @@ forceinline int64 InterlockedCompareExchange64(volatile int64 *dest, int64 exch, _asm{ lea esi,_cmp; lea edi,exch; - + mov eax,[esi]; mov edx,4[esi]; mov ebx,[edi]; mov ecx,4[edi]; mov esi,dest; - + lock CMPXCHG8B [esi]; } } @@ -109,7 +109,7 @@ static forceinline int64 InterlockedIncrement64(volatile int64 *addend){ static forceinline int32 InterlockedIncrement(volatile int32 *addend){ - return __sync_add_and_fetch(addend, 1); + return __sync_add_and_fetch(addend, 1); }//end: InterlockedIncrement() @@ -139,7 +139,7 @@ static forceinline int64 InterlockedExchange64(volatile int64 *target, int64 val static forceinline int32 InterlockedExchange(volatile int32 *target, int32 val){ - return __sync_lock_test_and_set(target, val); + return __sync_lock_test_and_set(target, val); }//end: InterlockedExchange() |