diff --git a/stepmania/src/arch/Threads/Threads_Pthreads.cpp b/stepmania/src/arch/Threads/Threads_Pthreads.cpp index ad5ac8c34b..c29e67a173 100644 --- a/stepmania/src/arch/Threads/Threads_Pthreads.cpp +++ b/stepmania/src/arch/Threads/Threads_Pthreads.cpp @@ -1,9 +1,9 @@ #include "global.h" #include "Threads_Pthreads.h" #include +#include #if defined(LINUX) -#define PID_BASED_THREADS #include "archutils/Unix/LinuxThreadHelpers.h" #endif @@ -63,7 +63,7 @@ int ThreadImpl_Pthreads::Wait() return (int) val; } -static ThreadImpl *MakeThisThread() +ThreadImpl *MakeThisThread() { ThreadImpl_Pthreads *thread = new ThreadImpl_Pthreads; @@ -97,7 +97,7 @@ static void *StartThread( void *pData ) ThreadImpl *MakeThread( int (*pFunc)(void *pData), void *pData ) { - ThreadImpl_Win32 *thread = new ThreadImpl_Pthreads; + ThreadImpl_Pthreads *thread = new ThreadImpl_Pthreads; thread->m_pFunc = pFunc; thread->m_pData = pData; @@ -128,7 +128,7 @@ MutexImpl_Pthreads::~MutexImpl_Pthreads() bool MutexImpl_Pthreads::Lock() { - if( LockedBy == GetCurrentThreadId() ) + if( LockedBy == (uint64_t) GetCurrentThreadId() ) { ++LockCnt; return true; diff --git a/stepmania/src/arch/Threads/Threads_Pthreads.h b/stepmania/src/arch/Threads/Threads_Pthreads.h index 54cc540fd0..52503e2cc3 100644 --- a/stepmania/src/arch/Threads/Threads_Pthreads.h +++ b/stepmania/src/arch/Threads/Threads_Pthreads.h @@ -3,6 +3,10 @@ #include "Threads.h" +#if defined(LINUX) +#define PID_BASED_THREADS +#endif + class ThreadImpl_Pthreads: public ThreadImpl { public: