diff options
Diffstat (limited to 'intern')
-rw-r--r-- | intern/atomic/atomic_ops.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/intern/atomic/atomic_ops.h b/intern/atomic/atomic_ops.h index 71219e919f1..d8161d10401 100644 --- a/intern/atomic/atomic_ops.h +++ b/intern/atomic/atomic_ops.h @@ -123,13 +123,13 @@ atomic_cas_uint64(uint64_t *v, uint64_t old, uint64_t _new) ATOMIC_INLINE uint64_t atomic_add_uint64(uint64_t *p, uint64_t x) { - return InterlockedExchangeAdd64((int64_t *)p, (int64_t)x); + return InterlockedExchangeAdd64((int64_t *)p, (int64_t)x) + x; } ATOMIC_INLINE uint64_t atomic_sub_uint64(uint64_t *p, uint64_t x) { - return InterlockedExchangeAdd64((int64_t *)p, -((int64_t)x)); + return InterlockedExchangeAdd64((int64_t *)p, -((int64_t)x)) - x; } ATOMIC_INLINE uint64_t @@ -268,13 +268,13 @@ atomic_cas_uint32(uint32_t *v, uint32_t old, uint32_t _new) ATOMIC_INLINE uint32_t atomic_add_uint32(uint32_t *p, uint32_t x) { - return InterlockedExchangeAdd(p, x); + return InterlockedExchangeAdd(p, x) + x; } ATOMIC_INLINE uint32_t atomic_sub_uint32(uint32_t *p, uint32_t x) { - return InterlockedExchangeAdd(p, -((int32_t)x)); + return InterlockedExchangeAdd(p, -((int32_t)x)) - x; } ATOMIC_INLINE uint32_t |