summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/heap/GCThreadSharedData.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2015-05-20 09:56:07 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2015-05-20 09:56:07 +0000
commit41386e9cb918eed93b3f13648cbef387e371e451 (patch)
treea97f9d7bd1d9d091833286085f72da9d83fd0606 /Source/JavaScriptCore/heap/GCThreadSharedData.h
parente15dd966d523731101f70ccf768bba12435a0208 (diff)
downloadWebKitGtk-tarball-41386e9cb918eed93b3f13648cbef387e371e451.tar.gz
webkitgtk-2.4.9webkitgtk-2.4.9
Diffstat (limited to 'Source/JavaScriptCore/heap/GCThreadSharedData.h')
-rw-r--r--Source/JavaScriptCore/heap/GCThreadSharedData.h27
1 files changed, 12 insertions, 15 deletions
diff --git a/Source/JavaScriptCore/heap/GCThreadSharedData.h b/Source/JavaScriptCore/heap/GCThreadSharedData.h
index ae0cdfb2e..915c2c991 100644
--- a/Source/JavaScriptCore/heap/GCThreadSharedData.h
+++ b/Source/JavaScriptCore/heap/GCThreadSharedData.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009, 2011, 2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2009, 2011 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -32,18 +32,16 @@
#include "UnconditionalFinalizer.h"
#include "WeakReferenceHarvester.h"
#include <condition_variable>
-#include <wtf/Condition.h>
#include <wtf/HashSet.h>
-#include <wtf/Lock.h>
+#include <wtf/TCSpinLock.h>
#include <wtf/Vector.h>
namespace JSC {
-class CopiedBlock;
-class CopiedSpace;
-class CopyVisitor;
class GCThread;
class VM;
+class CopiedSpace;
+class CopyVisitor;
enum GCPhase {
NoPhase,
@@ -53,7 +51,6 @@ enum GCPhase {
};
class GCThreadSharedData {
- WTF_MAKE_FAST_ALLOCATED;
public:
GCThreadSharedData(VM*);
~GCThreadSharedData();
@@ -89,23 +86,23 @@ private:
Vector<GCThread*> m_gcThreads;
- Lock m_markingMutex;
- Condition m_markingConditionVariable;
+ std::mutex m_markingMutex;
+ std::condition_variable m_markingConditionVariable;
MarkStackArray m_sharedMarkStack;
unsigned m_numberOfActiveParallelMarkers;
bool m_parallelMarkersShouldExit;
- Lock m_opaqueRootsMutex;
+ Mutex m_opaqueRootsLock;
HashSet<void*> m_opaqueRoots;
- Lock m_copyLock;
+ SpinLock m_copyLock;
Vector<CopiedBlock*> m_blocksToCopy;
size_t m_copyIndex;
static const size_t s_blockFragmentLength = 32;
- Lock m_phaseMutex;
- Condition m_phaseConditionVariable;
- Condition m_activityConditionVariable;
+ std::mutex m_phaseMutex;
+ std::condition_variable m_phaseConditionVariable;
+ std::condition_variable m_activityConditionVariable;
unsigned m_numberOfActiveGCThreads;
bool m_gcThreadsShouldWait;
GCPhase m_currentPhase;
@@ -116,7 +113,7 @@ private:
inline void GCThreadSharedData::getNextBlocksToCopy(size_t& start, size_t& end)
{
- LockHolder locker(&m_copyLock);
+ SpinLockHolder locker(&m_copyLock);
start = m_copyIndex;
end = std::min(m_blocksToCopy.size(), m_copyIndex + s_blockFragmentLength);
m_copyIndex = end;