[x265-commits] [x265] threading: make ATOMIC_ADD consistent across compilers
Steve Borho
steve at borho.org
Fri Feb 6 03:18:07 CET 2015
details: http://hg.videolan.org/x265/rev/82f8e72e9755
branches:
changeset: 9317:82f8e72e9755
user: Steve Borho <steve at borho.org>
date: Thu Feb 05 20:03:59 2015 -0600
description:
threading: make ATOMIC_ADD consistent across compilers
diffstat:
source/common/threading.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r bea0d617f625 -r 82f8e72e9755 source/common/threading.h
--- a/source/common/threading.h Thu Feb 05 12:57:40 2015 -0600
+++ b/source/common/threading.h Thu Feb 05 20:03:59 2015 -0600
@@ -53,7 +53,7 @@
#define ATOMIC_AND(ptr, mask) __sync_fetch_and_and(ptr, mask)
#define ATOMIC_INC(ptr) __sync_add_and_fetch((volatile int32_t*)ptr, 1)
#define ATOMIC_DEC(ptr) __sync_add_and_fetch((volatile int32_t*)ptr, -1)
-#define ATOMIC_ADD(ptr, value) __sync_add_and_fetch((volatile int32_t*)ptr, value)
+#define ATOMIC_ADD(ptr, value) __sync_fetch_and_add((volatile int32_t*)ptr, value)
#define GIVE_UP_TIME() usleep(0)
#elif defined(_MSC_VER) /* Windows atomic intrinsics */
More information about the x265-commits
mailing list