summaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/webkit/Source/JavaScriptCore/wtf/Atomics.h18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Atomics.h b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Atomics.h
index bce5fba..acf0e5a 100644
--- a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Atomics.h
+++ b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Atomics.h
@@ -63,18 +63,10 @@
#if OS(WINDOWS)
#include <windows.h>
-#elif OS(DARWIN)
-#include <libkern/OSAtomic.h>
#elif OS(ANDROID)
#include <cutils/atomic.h>
#elif OS(QNX)
#include <atomic.h>
-#elif COMPILER(GCC) && !OS(SYMBIAN)
-#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2))
-#include <ext/atomicity.h>
-#else
-#include <bits/atomicity.h>
-#endif
#endif
namespace WTF {
@@ -90,12 +82,6 @@ inline int atomicIncrement(int volatile* addend) { return InterlockedIncrement(r
inline int atomicDecrement(int volatile* addend) { return InterlockedDecrement(reinterpret_cast<long volatile*>(addend)); }
#endif
-#elif OS(DARWIN)
-#define WTF_USE_LOCKFREE_THREADSAFEREFCOUNTED 1
-
-inline int atomicIncrement(int volatile* addend) { return OSAtomicIncrement32Barrier(const_cast<int*>(addend)); }
-inline int atomicDecrement(int volatile* addend) { return OSAtomicDecrement32Barrier(const_cast<int*>(addend)); }
-
#elif OS(ANDROID)
inline int atomicIncrement(int volatile* addend) { return android_atomic_inc(addend); }
@@ -109,8 +95,8 @@ inline int atomicDecrement(int volatile* addend) { return (int) atomic_sub_value
#elif COMPILER(GCC) && !CPU(SPARC64) && !OS(SYMBIAN) // sizeof(_Atomic_word) != sizeof(int) on sparc64 gcc
#define WTF_USE_LOCKFREE_THREADSAFEREFCOUNTED 1
-inline int atomicIncrement(int volatile* addend) { return __gnu_cxx::__exchange_and_add(addend, 1) + 1; }
-inline int atomicDecrement(int volatile* addend) { return __gnu_cxx::__exchange_and_add(addend, -1) - 1; }
+inline int atomicIncrement(int volatile* addend) { return __sync_add_and_fetch(addend, 1); }
+inline int atomicDecrement(int volatile* addend) { return __sync_sub_and_fetch(addend, 1); }
#endif