diff options
| author | nakeee <nakeee@gmail.com> | 2008-10-02 21:40:20 +0000 |
|---|---|---|
| committer | nakeee <nakeee@gmail.com> | 2008-10-02 21:40:20 +0000 |
| commit | 3d6d64c6327508594fcc48f07f0e5ab3657db5b6 (patch) | |
| tree | 87ef93a5566bcd78dc6342e357db225c0a74035b /Source/Core/Common/Src/Thread.cpp | |
| parent | 65f8c4bca17686dd0eabb78ccdf98ee39d51e974 (diff) | |
Get rid of locks added InterlockedExchangeAdd function in thread.cpp
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@748 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/Common/Src/Thread.cpp')
| -rw-r--r-- | Source/Core/Common/Src/Thread.cpp | 11 |
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
|
