summaryrefslogtreecommitdiff
path: root/Source/Core/Common/Src/Thread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/Common/Src/Thread.cpp')
-rw-r--r--Source/Core/Common/Src/Thread.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/Core/Common/Src/Thread.cpp b/Source/Core/Common/Src/Thread.cpp
index 716f79ff55..df7c8d50d9 100644
--- a/Source/Core/Common/Src/Thread.cpp
+++ b/Source/Core/Common/Src/Thread.cpp
@@ -344,6 +344,17 @@ void Event::Wait()
is_set_ = false;
pthread_mutex_unlock(&mutex_);
}
+
+int InterlockedExchangeAdd( int* Addend, int Increment )
+{
+
+#if defined(__GNUC__) && defined (__GNUC_MINOR__) && ((4 < __GNUC__) || (4 == __GNUC__ && 1 <= __GNUC_MINOR__))
+ return __sync_add_and_fetch(Addend, Increment);
+#else
+ // TODO support old gcc
+#endif
+}
+
#endif