mirror of
https://github.com/thunderbrewhq/squall.git
synced 2025-12-12 02:22:30 +00:00
feat(thread): implement S_Thread::s_SLaunchThread for windows
This commit is contained in:
parent
968bb5d3b7
commit
8521485e49
1 changed files with 19 additions and 1 deletions
|
|
@ -1,6 +1,24 @@
|
||||||
#include "storm/thread/S_Thread.hpp"
|
#include "storm/thread/S_Thread.hpp"
|
||||||
|
#include "storm/Memory.hpp"
|
||||||
|
|
||||||
DWORD S_Thread::s_SLaunchThread(void* threadParam) {
|
DWORD S_Thread::s_SLaunchThread(void* threadParam) {
|
||||||
|
auto params = static_cast<SThreadParmBlock*>(threadParam);
|
||||||
|
auto proc = params->threadProc;
|
||||||
|
auto param = params->threadParam;
|
||||||
|
|
||||||
|
SMemFree(threadParam);
|
||||||
|
|
||||||
|
auto val = proc(param);
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
return 0;
|
// S_Thread::s_threadCrit.Enter();
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
// - remove tracking in S_Thread::s_threads
|
||||||
|
// - decrement num threads
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
// S_Thread::s_threadCrit.Leave();
|
||||||
|
|
||||||
|
return val;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue