Bug 2955. Workaround for lack of atomic operations in GCCE standard libraries (fall back to default use of Mutex)
--- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h Fri Jun 11 16:26:16 2010 +0100
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h Wed Jun 16 16:18:05 2010 +0100
@@ -73,7 +73,7 @@
#include <windows.h>
#elif PLATFORM(DARWIN)
#include <libkern/OSAtomic.h>
-#elif COMPILER(GCC)
+#elif COMPILER(GCC) && !defined(__GCCE__) // workaround for lack of atomic ops in Symbian GCCE
#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2))
#include <ext/atomicity.h>
#else
@@ -228,7 +228,7 @@
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 COMPILER(GCC) && !PLATFORM(SPARC64) // sizeof(_Atomic_word) != sizeof(int) on sparc64 gcc
+#elif COMPILER(GCC) && !PLATFORM(SPARC64) && !defined(__GCCE__) // sizeof(_Atomic_word) != sizeof(int) on sparc64 gcc
#define WTF_USE_LOCKFREE_THREADSAFESHARED 1
inline int atomicIncrement(int volatile* addend) { return __gnu_cxx::__exchange_and_add(addend, 1) + 1; }
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/Threading.h Fri Jun 11 16:26:16 2010 +0100
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Threading.h Wed Jun 16 16:18:05 2010 +0100
@@ -73,7 +73,7 @@
#include <windows.h>
#elif PLATFORM(DARWIN)
#include <libkern/OSAtomic.h>
-#elif COMPILER(GCC)
+#elif COMPILER(GCC) && !defined(__GCCE__) // workaround for lack of atomic ops in Symbian GCCE
#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2))
#include <ext/atomicity.h>
#else
@@ -232,7 +232,7 @@
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 COMPILER(GCC) && !PLATFORM(SPARC64) // sizeof(_Atomic_word) != sizeof(int) on sparc64 gcc
+#elif COMPILER(GCC) && !PLATFORM(SPARC64) && !defined(__GCCE__) // sizeof(_Atomic_word) != sizeof(int) on sparc64 gcc
#define WTF_USE_LOCKFREE_THREADSAFESHARED 1
inline int atomicIncrement(int volatile* addend) { return __gnu_cxx::__exchange_and_add(addend, 1) + 1; }