Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/hx/gc/Immix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ static int sgTimeToNextTableUpdate = 1;



std::mutex *gThreadStateChangeLock=nullptr;
std::recursive_mutex *gThreadStateChangeLock=nullptr;
std::mutex *gSpecialObjectLock=nullptr;

class LocalAllocator;
Expand Down Expand Up @@ -3133,12 +3133,12 @@ class GlobalAllocator
{
if (!gThreadStateChangeLock)
{
gThreadStateChangeLock = new std::mutex();
gThreadStateChangeLock = new std::recursive_mutex();
gSpecialObjectLock = new std::mutex();
}
// Until we add ourselves, the collector will not wait
// on us - ie, we are assumed ot be in a GC free zone.
std::lock_guard<std::mutex> lock(*gThreadStateChangeLock);
std::lock_guard<std::recursive_mutex> lock(*gThreadStateChangeLock);
mLocalAllocs.push(inAlloc);
// TODO Attach debugger
}
Expand All @@ -3161,7 +3161,7 @@ class GlobalAllocator

LocalAllocator *GetPooledAllocator()
{
std::lock_guard<std::mutex> lock(*gThreadStateChangeLock);
std::lock_guard<std::recursive_mutex> lock(*gThreadStateChangeLock);
for(int p=0;p<LOCAL_POOL_SIZE;p++)
{
if (mLocalPool[p])
Expand Down Expand Up @@ -5857,7 +5857,7 @@ class LocalAllocator : public hx::StackContext
EnterGCFreeZone();
#endif

std::lock_guard<std::mutex> lock(*gThreadStateChangeLock);
std::lock_guard<std::recursive_mutex> lock(*gThreadStateChangeLock);

#ifdef HX_WINDOWS
mID = 0;
Expand Down Expand Up @@ -6084,7 +6084,7 @@ class LocalAllocator : public hx::StackContext
if (!mGCFreeZone)
CriticalGCError("GCFree Zone mismatch");

std::lock_guard<std::mutex> lock(*gThreadStateChangeLock);
std::lock_guard<std::recursive_mutex> lock(*gThreadStateChangeLock);
mReadyForCollect.Reset();
mGCFreeZone = false;
#endif
Expand Down
Loading