ThreadImpl_Pthreads compiles

This commit is contained in:
Glenn Maynard
2004-06-11 05:26:00 +00:00
parent 310c18d70c
commit e80b8885db
2 changed files with 8 additions and 4 deletions
@@ -1,9 +1,9 @@
#include "global.h" #include "global.h"
#include "Threads_Pthreads.h" #include "Threads_Pthreads.h"
#include <sys/time.h> #include <sys/time.h>
#include <errno.h>
#if defined(LINUX) #if defined(LINUX)
#define PID_BASED_THREADS
#include "archutils/Unix/LinuxThreadHelpers.h" #include "archutils/Unix/LinuxThreadHelpers.h"
#endif #endif
@@ -63,7 +63,7 @@ int ThreadImpl_Pthreads::Wait()
return (int) val; return (int) val;
} }
static ThreadImpl *MakeThisThread() ThreadImpl *MakeThisThread()
{ {
ThreadImpl_Pthreads *thread = new ThreadImpl_Pthreads; ThreadImpl_Pthreads *thread = new ThreadImpl_Pthreads;
@@ -97,7 +97,7 @@ static void *StartThread( void *pData )
ThreadImpl *MakeThread( int (*pFunc)(void *pData), 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_pFunc = pFunc;
thread->m_pData = pData; thread->m_pData = pData;
@@ -128,7 +128,7 @@ MutexImpl_Pthreads::~MutexImpl_Pthreads()
bool MutexImpl_Pthreads::Lock() bool MutexImpl_Pthreads::Lock()
{ {
if( LockedBy == GetCurrentThreadId() ) if( LockedBy == (uint64_t) GetCurrentThreadId() )
{ {
++LockCnt; ++LockCnt;
return true; return true;
@@ -3,6 +3,10 @@
#include "Threads.h" #include "Threads.h"
#if defined(LINUX)
#define PID_BASED_THREADS
#endif
class ThreadImpl_Pthreads: public ThreadImpl class ThreadImpl_Pthreads: public ThreadImpl
{ {
public: public: