More PAL related changes required for restricted platforms. (#4037)

Signed-off-by: bosnichd <bosnichd@amazon.com>
This commit is contained in:
bosnichd
2021-09-10 09:08:07 -06:00
committed by GitHub
parent e638f27572
commit d366620818
5 changed files with 13 additions and 10 deletions
@@ -15,7 +15,7 @@ namespace AZStd
{
namespace Platform
{
void PostThreadRun();
unsigned __stdcall PostThreadRun();
HANDLE CreateThread(unsigned stackSize, unsigned (__stdcall* threadRunFunction)(void*), AZStd::Internal::thread_info* ti, unsigned int* id);
unsigned HardwareConcurrency();
void SetThreadName(HANDLE hThread, const char* threadName);
@@ -40,9 +40,7 @@ namespace AZStd
ThreadEventBus::Broadcast(&ThreadEventBus::Events::OnThreadExit, this_thread::get_id()); // goes to client listeners
ThreadDrillerEventBus::Broadcast(&ThreadDrillerEventBus::Events::OnThreadExit, this_thread::get_id()); // goes to the profiler.
Platform::PostThreadRun();
return 0;
return Platform::PostThreadRun();
}
/**
@@ -16,9 +16,10 @@ namespace AZStd
{
namespace Platform
{
void PostThreadRun()
unsigned __stdcall PostThreadRun()
{
_endthreadex(0);
return 0;
}
HANDLE CreateThread(unsigned stackSize, unsigned (__stdcall* threadRunFunction)(void*), AZStd::Internal::thread_info* ti, unsigned int* id)