1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-07-04 23:36:00 +02:00

Fixes from macOS, first working build

This commit is contained in:
Brian Fiete 2019-10-15 17:27:09 -07:00
parent 2e84b4229c
commit 67ee302451
19 changed files with 237 additions and 107 deletions

View file

@ -10,7 +10,7 @@
#endif
#include "windows/config.h"
#include "windows/gperftools/tcmalloc.h"
#elif defined BF_PLATFORM_OSX
#elif defined BF_PLATFORM_MACOS
#include "osx/config.h"
#include "osx/gperftools/tcmalloc.h"
#elif defined BF_PLATFORM_IOS

View file

@ -76,8 +76,10 @@ bool Thread::GetIsThreadPoolThread()
bool Thread::JoinInternal(int millisecondsTimeout)
{
bool success = BfpThread_WaitFor(GetInternalThread()->mThreadHandle, millisecondsTimeout);
//((BFInternalThread*) thread)->ClrState(Threading::ThreadState::WaitSleepJoin);
auto internalThread = GetInternalThread();
if (internalThread == NULL)
return true;
bool success = BfpThread_WaitFor(internalThread->mThreadHandle, millisecondsTimeout);
return success;
}
@ -176,6 +178,8 @@ void Thread::ManualThreadInit()
{
#ifdef BF_THREAD_TLS
sCurrentThread = this;
#else
BfpTLS_SetValue(BfTLSManager::sInternalThreadKey, this);
#endif
BfInternalThread* internalThread = SetupInternalThread();
@ -207,6 +211,8 @@ void Thread::SetStackStart(void* ptr)
void Thread::InternalFinalize()
{
auto internalThread = GetInternalThread();
if (internalThread == NULL)
return;
bool wantsJoin = false;
//