summaryrefslogtreecommitdiff
path: root/Source/Core/Common
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/Common')
-rw-r--r--Source/Core/Common/Src/CommonFuncs.h2
-rw-r--r--Source/Core/Common/Src/CommonTypes.h3
-rw-r--r--Source/Core/Common/Src/Log.h2
-rw-r--r--Source/Core/Common/Src/LogManager.cpp2
-rw-r--r--Source/Core/Common/Src/Thread.h8
5 files changed, 15 insertions, 2 deletions
diff --git a/Source/Core/Common/Src/CommonFuncs.h b/Source/Core/Common/Src/CommonFuncs.h
index 86933fdfa0..d71e9fe24d 100644
--- a/Source/Core/Common/Src/CommonFuncs.h
+++ b/Source/Core/Common/Src/CommonFuncs.h
@@ -30,7 +30,9 @@
char* strndup (char const *s, size_t n);
size_t strnlen(const char *s, size_t n);
#else
+#ifdef __linux__
#include <byteswap.h>
+#endif
#endif // APPLE
#include <errno.h>
// go to debugger mode
diff --git a/Source/Core/Common/Src/CommonTypes.h b/Source/Core/Common/Src/CommonTypes.h
index 2dee2425d1..6f9d985deb 100644
--- a/Source/Core/Common/Src/CommonTypes.h
+++ b/Source/Core/Common/Src/CommonTypes.h
@@ -39,6 +39,8 @@ typedef signed __int64 s64;
#else
+#ifndef GEKKO
+
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;
@@ -49,6 +51,7 @@ typedef short s16;
typedef int s32;
typedef long long s64;
+#endif
// For using windows lock code
#define TCHAR char
#define LONG int
diff --git a/Source/Core/Common/Src/Log.h b/Source/Core/Common/Src/Log.h
index b7c83ddf2f..a9f2833d07 100644
--- a/Source/Core/Common/Src/Log.h
+++ b/Source/Core/Common/Src/Log.h
@@ -42,7 +42,7 @@ enum LOG_TYPE {
DVDINTERFACE,
DYNA_REC,
EXPANSIONINTERFACE,
- GEKKO,
+ POWERPC,
GPFIFO,
HLE,
MASTER_LOG,
diff --git a/Source/Core/Common/Src/LogManager.cpp b/Source/Core/Common/Src/LogManager.cpp
index f2a47334e0..71bafb9529 100644
--- a/Source/Core/Common/Src/LogManager.cpp
+++ b/Source/Core/Common/Src/LogManager.cpp
@@ -40,7 +40,7 @@ LogManager::LogManager()\
m_Log[LogTypes::GPFIFO] = new LogContainer("GP", "GPFifo");
m_Log[LogTypes::EXPANSIONINTERFACE] = new LogContainer("EXI", "ExpansionInt");
m_Log[LogTypes::AUDIO_INTERFACE] = new LogContainer("AI", "AudioInt");
- m_Log[LogTypes::GEKKO] = new LogContainer("GEKKO", "IBM CPU");
+ m_Log[LogTypes::POWERPC] = new LogContainer("PowerPC", "IBM CPU");
m_Log[LogTypes::HLE] = new LogContainer("HLE", "HLE");
m_Log[LogTypes::DSPHLE] = new LogContainer("DSPHLE", "DSP HLE");
m_Log[LogTypes::DSPLLE] = new LogContainer("DSPLLE", "DSP LLE");
diff --git a/Source/Core/Common/Src/Thread.h b/Source/Core/Common/Src/Thread.h
index 8a0fb88669..61e69509a1 100644
--- a/Source/Core/Common/Src/Thread.h
+++ b/Source/Core/Common/Src/Thread.h
@@ -26,6 +26,8 @@
#include <unistd.h>
#ifdef _POSIX_THREADS
#include <pthread.h>
+#elif GEKKO
+#include <ogc/lwp_threads.h>
#else
#error unsupported platform (no pthreads?)
#endif
@@ -59,8 +61,10 @@ class CriticalSection
#ifdef _WIN32
CRITICAL_SECTION section;
#else
+#ifdef _POSIX_THREADS
pthread_mutex_t mutex;
#endif
+#endif
public:
CriticalSection(int spincount = 1000);
@@ -96,8 +100,10 @@ private:
HANDLE m_hThread;
DWORD m_threadId;
#else
+#ifdef _POSIX_THREADS
pthread_t thread_id;
#endif
+#endif
};
@@ -140,9 +146,11 @@ private:
static const int THREAD_WAIT_TIMEOUT = 5000; // INFINITE or 5000 for example
#else
bool is_set_;
+#ifdef _POSIX_THREADS
pthread_cond_t event_;
pthread_mutex_t mutex_;
#endif
+#endif
};
void InitThreading();