AVA2 cross-platform client parity baseline

This commit is contained in:
shen
2026-10-06 00:53:42 -07:00
commit 9f748eb05a
3271 changed files with 1275528 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
#include "StdAfx.h"
#include "Thread.h"
CThread::CThread() : m_pArg(NULL), m_hThread(NULL), m_uThreadID(0)
{
}
int CThread::Create(void * arg)
{
Arg(arg);
m_hThread = (HANDLE) _beginthreadex(NULL, 0, EntryPoint, this, 0, &m_uThreadID);
if (!m_hThread)
return false;
SetThreadPriority(m_hThread, THREAD_PRIORITY_NORMAL);
return true;
}
UINT CThread::Run(void * arg)
{
if (!Setup())
return 0;
return (Execute(arg));
}
/* Static */
UINT CALLBACK CThread::EntryPoint(void * pThis)
{
CThread * pThread = (CThread *) pThis;
return pThread->Run(pThread->Arg());
}