Fixed *nix threading issue;
Thread objects now use variable names consistent with MCS convention; Fixed a few *nix threading cornercases git-svn-id: http://mc-server.googlecode.com/svn/trunk@392 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
@@ -28,7 +28,7 @@ class cIsThread
|
||||
protected:
|
||||
virtual void Execute(void) = 0; // This function is called in the new thread's context
|
||||
|
||||
volatile bool mShouldTerminate; // The overriden Execute() method should check this periodically and terminate if this is true
|
||||
volatile bool m_ShouldTerminate; // The overriden Execute() method should check this periodically and terminate if this is true
|
||||
|
||||
public:
|
||||
cIsThread(const AString & iThreadName);
|
||||
@@ -40,26 +40,26 @@ public:
|
||||
static unsigned long GetCurrentID(void); // Returns the OS-dependent thread ID for the caller's thread
|
||||
|
||||
private:
|
||||
AString mThreadName;
|
||||
AString m_ThreadName;
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
HANDLE mHandle;
|
||||
HANDLE m_Handle;
|
||||
|
||||
static DWORD_PTR __stdcall thrExecute(LPVOID iParam)
|
||||
static DWORD_PTR __stdcall thrExecute(LPVOID a_Param)
|
||||
{
|
||||
((cIsThread *)iParam)->Execute();
|
||||
((cIsThread *)a_Param)->Execute();
|
||||
return 0;
|
||||
}
|
||||
|
||||
#else // _WIN32
|
||||
|
||||
pthread_t mHandle;
|
||||
bool mHasStarted;
|
||||
pthread_t m_Handle;
|
||||
bool m_HasStarted;
|
||||
|
||||
static void * thrExecute(void * iParam)
|
||||
static void * thrExecute(void * a_Param)
|
||||
{
|
||||
((cIsThread *)iParam)->Execute();
|
||||
((cIsThread *)a_Param)->Execute();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user