X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/14957cd040308e3eeec43d26bae5d76da13fcd85..8b637bb680022adfddad653280734877951535a9:/heap/MachineStackMarker.h?ds=inline diff --git a/heap/MachineStackMarker.h b/heap/MachineStackMarker.h index c814ac5..44ad8b6 100644 --- a/heap/MachineStackMarker.h +++ b/heap/MachineStackMarker.h @@ -23,16 +23,13 @@ #define MachineThreads_h #include +#include #include -#if ENABLE(JSC_MULTIPLE_THREADS) -#include -#endif - namespace JSC { - class Heap; class ConservativeRoots; + class Heap; class MachineThreads { WTF_MAKE_NONCOPYABLE(MachineThreads); @@ -42,29 +39,28 @@ namespace JSC { void gatherConservativeRoots(ConservativeRoots&, void* stackCurrent); -#if ENABLE(JSC_MULTIPLE_THREADS) +#if PLATFORM(IOS) + JS_EXPORT_PRIVATE void makeUsableFromMultipleThreads(); +#else void makeUsableFromMultipleThreads(); - void addCurrentThread(); // Only needs to be called by clients that can use the same heap from multiple threads. #endif + JS_EXPORT_PRIVATE void addCurrentThread(); // Only needs to be called by clients that can use the same heap from multiple threads. private: void gatherFromCurrentThread(ConservativeRoots&, void* stackCurrent); -#if ENABLE(JSC_MULTIPLE_THREADS) class Thread; static void removeThread(void*); void removeCurrentThread(); void gatherFromOtherThread(ConservativeRoots&, Thread*); -#endif - - Heap* m_heap; -#if ENABLE(JSC_MULTIPLE_THREADS) Mutex m_registeredThreadsMutex; Thread* m_registeredThreads; - pthread_key_t m_threadSpecific; + WTF::ThreadSpecificKey m_threadSpecific; +#if !ASSERT_DISABLED + Heap* m_heap; #endif };