mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-08-20 09:57:10 +00:00
Use standard thread IDs in C4JThread
This commit is contained in:
parent
4f5695d4af
commit
7feae96ceb
|
|
@ -113,8 +113,10 @@ C4JThread::C4JThread(C4JThreadStartFunc* startFunc, void* param,
|
||||||
#else
|
#else
|
||||||
m_threadID = 0;
|
m_threadID = 0;
|
||||||
m_threadHandle = 0;
|
m_threadHandle = 0;
|
||||||
|
DWORD threadID = 0;
|
||||||
m_threadHandle = CreateThread(NULL, m_stackSize, entryPoint, this,
|
m_threadHandle = CreateThread(NULL, m_stackSize, entryPoint, this,
|
||||||
CREATE_SUSPENDED, &m_threadID);
|
CREATE_SUSPENDED, &threadID);
|
||||||
|
m_threadID = threadID;
|
||||||
#endif
|
#endif
|
||||||
EnterCriticalSection(&ms_threadListCS);
|
EnterCriticalSection(&ms_threadListCS);
|
||||||
ms_threadList.push_back(this);
|
ms_threadList.push_back(this);
|
||||||
|
|
@ -454,7 +456,7 @@ C4JThread* C4JThread::getCurrentThread() {
|
||||||
#elif defined __PSVITA__
|
#elif defined __PSVITA__
|
||||||
SceUID currThreadID = sceKernelGetThreadId();
|
SceUID currThreadID = sceKernelGetThreadId();
|
||||||
#else
|
#else
|
||||||
DWORD currThreadID = GetCurrentThreadId();
|
std::uint32_t currThreadID = GetCurrentThreadId();
|
||||||
#endif //__PS3__
|
#endif //__PS3__
|
||||||
EnterCriticalSection(&ms_threadListCS);
|
EnterCriticalSection(&ms_threadListCS);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -210,7 +210,7 @@ private:
|
||||||
int m_priority;
|
int m_priority;
|
||||||
static SceInt32 entryPoint(SceSize argSize, void* pArgBlock);
|
static SceInt32 entryPoint(SceSize argSize, void* pArgBlock);
|
||||||
#else
|
#else
|
||||||
DWORD m_threadID;
|
std::uint32_t m_threadID;
|
||||||
HANDLE m_threadHandle;
|
HANDLE m_threadHandle;
|
||||||
Event* m_completionFlag;
|
Event* m_completionFlag;
|
||||||
static DWORD WINAPI entryPoint(LPVOID lpParam);
|
static DWORD WINAPI entryPoint(LPVOID lpParam);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue