summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorhrydgard <hrydgard@gmail.com>2008-10-02 21:50:35 +0000
committerhrydgard <hrydgard@gmail.com>2008-10-02 21:50:35 +0000
commita2e0cdcbc125c1ddb4753027e257672aee69ac4b (patch)
tree01f7b128a41ac18a0d78607e359fe11e99fed745 /Source/Core
parent3d6d64c6327508594fcc48f07f0e5ab3657db5b6 (diff)
style fixup
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@749 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Common/Src/Thread.cpp5
-rw-r--r--Source/Core/Common/Src/Thread.h7
2 files changed, 7 insertions, 5 deletions
diff --git a/Source/Core/Common/Src/Thread.cpp b/Source/Core/Common/Src/Thread.cpp
index df7c8d50d9..db02b4598e 100644
--- a/Source/Core/Common/Src/Thread.cpp
+++ b/Source/Core/Common/Src/Thread.cpp
@@ -345,17 +345,16 @@ void Event::Wait()
pthread_mutex_unlock(&mutex_);
}
-int InterlockedExchangeAdd( int* Addend, int Increment )
+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
+#error Sorry - GCC versions that don't support __sync_add_and_fetch are not supported.
// TODO support old gcc
#endif
}
#endif
-
} // end of namespace Common
diff --git a/Source/Core/Common/Src/Thread.h b/Source/Core/Common/Src/Thread.h
index 3cc608f335..e71306baf1 100644
--- a/Source/Core/Common/Src/Thread.h
+++ b/Source/Core/Common/Src/Thread.h
@@ -112,9 +112,12 @@ class Event
void SleepCurrentThread(int ms);
-void SetCurrentThreadName(const char* name);
+void SetCurrentThreadName(const char *name);
+
+#ifndef _WIN32
+int InterlockedExchangeAdd(int *Addend, int Increment);
+#endif
-int InterlockedExchangeAdd( int* Addend, int Increment );
} // end of namespace Common