Title: [289557] branches/safari-613-branch
Revision
289557
Author
[email protected]
Date
2022-02-10 11:12:24 -0800 (Thu, 10 Feb 2022)

Log Message

Cherry-pick r289159. rdar://problem/88366590

    Thread suspend and resume should take a global lock to avoid deadlock
    https://bugs.webkit.org/show_bug.cgi?id=236159

    Reviewed by Geoffrey Garen.

    Source/bmalloc:

    Introduce pas_thread_suspend_lock and take it when suspending and resuming threads.

    * CMakeLists.txt:
    * bmalloc.xcodeproj/project.pbxproj:
    * libpas/src/libpas/pas_scavenger.c:
    (scavenger_thread_main):
    (pas_scavenger_clear_all_caches):
    * libpas/src/libpas/pas_thread_local_cache.c:
    (pas_thread_local_cache_for_all):
    * libpas/src/libpas/pas_thread_local_cache.h:
    * libpas/src/libpas/pas_thread_suspend_lock.c: Copied from Source/WTF/wtf/ThreadMessage.cpp.
    * libpas/src/libpas/pas_thread_suspend_lock.h: Copied from Source/WTF/wtf/ThreadMessage.cpp.

    Source/_javascript_Core:

    * heap/MachineStackMarker.cpp:
    (JSC::MachineThreads::tryCopyOtherThreadStack):
    (JSC::MachineThreads::tryCopyOtherThreadStacks):
    * heap/MachineStackMarker.h:
    * runtime/SamplingProfiler.cpp:
    (JSC::SamplingProfiler::takeSample):
    * runtime/VMTraps.cpp:
    * wasm/WasmMachineThreads.cpp:
    (JSC::Wasm::resetInstructionCacheOnAllThreads):

    Source/WTF:

    This patch introduces a global lock which should be taken while suspending and resuming a thread.
    It is possible that two different threads suspend and resume threads. And if threads suspend
    each other without critical section, it can cause a dead lock.

    To avoid this problem, we introduce a global lock which should be taken when suspending and resuming
    threads. Since libpas is also using thread suspension, we expose a global pas_thread_suspend_lock
    when libpas is used, and we use this lock in WTF's Thread suspension code.

    * wtf/ThreadMessage.cpp:
    (WTF::sendMessageScoped):
    * wtf/ThreadMessage.h:
    (WTF::sendMessage):
    * wtf/Threading.cpp:
    (WTF::ThreadSuspendLocker::ThreadSuspendLocker):
    (WTF::ThreadSuspendLocker::~ThreadSuspendLocker):
    * wtf/Threading.h:
    * wtf/posix/ThreadingPOSIX.cpp:
    (WTF::Thread::suspend):
    (WTF::Thread::resume):
    (WTF::Thread::getRegisters):
    * wtf/win/ThreadingWin.cpp:
    (WTF::Thread::suspend):
    (WTF::Thread::resume):
    (WTF::Thread::getRegisters):

    Tools:

    * TestWebKitAPI/Tests/WTF/ThreadMessages.cpp:
    (runThreadMessageTest):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289159 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Added Paths

Diff

Modified: branches/safari-613-branch/Source/_javascript_Core/heap/MachineStackMarker.cpp (289556 => 289557)


--- branches/safari-613-branch/Source/_javascript_Core/heap/MachineStackMarker.cpp	2022-02-10 19:12:19 UTC (rev 289556)
+++ branches/safari-613-branch/Source/_javascript_Core/heap/MachineStackMarker.cpp	2022-02-10 19:12:24 UTC (rev 289557)
@@ -105,10 +105,10 @@
 // significant performance loss as tryCopyOtherThreadStack is only called as part of an O(heapsize)
 // operation. As the heap is generally much larger than the stack the performance hit is minimal.
 // See: https://bugs.webkit.org/show_bug.cgi?id=146297
-void MachineThreads::tryCopyOtherThreadStack(Thread& thread, void* buffer, size_t capacity, size_t* size)
+void MachineThreads::tryCopyOtherThreadStack(const ThreadSuspendLocker& locker, Thread& thread, void* buffer, size_t capacity, size_t* size)
 {
     PlatformRegisters registers;
-    size_t registersSize = thread.getRegisters(registers);
+    size_t registersSize = thread.getRegisters(locker, registers);
 
     // This is a workaround for <rdar://problem/27607384>. libdispatch recycles work
     // queue threads without running pthread exit destructors. This can cause us to scan a
@@ -145,42 +145,45 @@
     BitVector isSuspended(threads.size());
 
     {
-        unsigned index = 0;
-        for (const Ref<Thread>& thread : threads) {
-            if (thread.ptr() != &currentThread
-                && thread.ptr() != &currentThreadForGC) {
-                auto result = thread->suspend();
-                if (result)
-                    isSuspended.set(index);
-                else {
+        ThreadSuspendLocker threadSuspendLocker;
+        {
+            unsigned index = 0;
+            for (const Ref<Thread>& thread : threads) {
+                if (thread.ptr() != &currentThread
+                    && thread.ptr() != &currentThreadForGC) {
+                    auto result = thread->suspend(threadSuspendLocker);
+                    if (result)
+                        isSuspended.set(index);
+                    else {
 #if OS(DARWIN)
-                    // These threads will be removed from the ThreadGroup. Thus, we do not do anything here except for reporting.
-                    ASSERT(result.error() != KERN_SUCCESS);
-                    WTFReportError(__FILE__, __LINE__, WTF_PRETTY_FUNCTION,
-                        "_javascript_ garbage collection encountered an invalid thread (err 0x%x): Thread [%d/%d: %p].",
-                        result.error(), index, threads.size(), thread.ptr());
+                        // These threads will be removed from the ThreadGroup. Thus, we do not do anything here except for reporting.
+                        ASSERT(result.error() != KERN_SUCCESS);
+                        WTFReportError(__FILE__, __LINE__, WTF_PRETTY_FUNCTION,
+                            "_javascript_ garbage collection encountered an invalid thread (err 0x%x): Thread [%d/%d: %p].",
+                            result.error(), index, threads.size(), thread.ptr());
 #endif
+                    }
                 }
+                ++index;
             }
-            ++index;
         }
-    }
 
-    {
-        unsigned index = 0;
-        for (auto& thread : threads) {
-            if (isSuspended.get(index))
-                tryCopyOtherThreadStack(thread.get(), buffer, capacity, size);
-            ++index;
+        {
+            unsigned index = 0;
+            for (auto& thread : threads) {
+                if (isSuspended.get(index))
+                    tryCopyOtherThreadStack(threadSuspendLocker, thread.get(), buffer, capacity, size);
+                ++index;
+            }
         }
-    }
 
-    {
-        unsigned index = 0;
-        for (auto& thread : threads) {
-            if (isSuspended.get(index))
-                thread->resume();
-            ++index;
+        {
+            unsigned index = 0;
+            for (auto& thread : threads) {
+                if (isSuspended.get(index))
+                    thread->resume(threadSuspendLocker);
+                ++index;
+            }
         }
     }
 

Modified: branches/safari-613-branch/Source/_javascript_Core/heap/MachineStackMarker.h (289556 => 289557)


--- branches/safari-613-branch/Source/_javascript_Core/heap/MachineStackMarker.h	2022-02-10 19:12:19 UTC (rev 289556)
+++ branches/safari-613-branch/Source/_javascript_Core/heap/MachineStackMarker.h	2022-02-10 19:12:24 UTC (rev 289557)
@@ -56,7 +56,7 @@
 private:
     void gatherFromCurrentThread(ConservativeRoots&, JITStubRoutineSet&, CodeBlockSet&, CurrentThreadState&);
 
-    void tryCopyOtherThreadStack(Thread&, void*, size_t capacity, size_t*);
+    void tryCopyOtherThreadStack(const ThreadSuspendLocker&, Thread&, void*, size_t capacity, size_t*);
     bool tryCopyOtherThreadStacks(const AbstractLocker&, void*, size_t capacity, size_t*, Thread&);
 
     std::shared_ptr<ThreadGroup> m_threadGroup;

Modified: branches/safari-613-branch/Source/_javascript_Core/runtime/SamplingProfiler.cpp (289556 => 289557)


--- branches/safari-613-branch/Source/_javascript_Core/runtime/SamplingProfiler.cpp	2022-02-10 19:12:19 UTC (rev 289556)
+++ branches/safari-613-branch/Source/_javascript_Core/runtime/SamplingProfiler.cpp	2022-02-10 19:12:24 UTC (rev 289557)
@@ -361,7 +361,8 @@
             wasmCalleesLocker.emplace(Wasm::CalleeRegistry::singleton().getLock());
 #endif
 
-        auto didSuspend = m_jscExecutionThread->suspend();
+        ThreadSuspendLocker threadSuspendLocker;
+        auto didSuspend = m_jscExecutionThread->suspend(threadSuspendLocker);
         if (didSuspend) {
             // While the JSC thread is suspended, we can't do things like malloc because the JSC thread
             // may be holding the malloc lock.
@@ -373,7 +374,7 @@
             void* llintPC;
             {
                 PlatformRegisters registers;
-                m_jscExecutionThread->getRegisters(registers);
+                m_jscExecutionThread->getRegisters(threadSuspendLocker, registers);
                 machineFrame = MachineContext::framePointer(registers);
                 callFrame = static_cast<CallFrame*>(machineFrame);
                 auto instructionPointer = MachineContext::instructionPointer(registers);
@@ -419,7 +420,7 @@
                 wasValidWalk = walker.wasValidWalk();
             }
 
-            m_jscExecutionThread->resume();
+            m_jscExecutionThread->resume(threadSuspendLocker);
 
             auto startTime = MonotonicTime::now();
             // We can now use data structures that malloc, and do other interesting things, again.

Modified: branches/safari-613-branch/Source/_javascript_Core/runtime/VMTraps.cpp (289556 => 289557)


--- branches/safari-613-branch/Source/_javascript_Core/runtime/VMTraps.cpp	2022-02-10 19:12:19 UTC (rev 289556)
+++ branches/safari-613-branch/Source/_javascript_Core/runtime/VMTraps.cpp	2022-02-10 19:12:24 UTC (rev 289557)
@@ -263,7 +263,8 @@
 
         auto optionalOwnerThread = vm.ownerThread();
         if (optionalOwnerThread) {
-            sendMessage(*optionalOwnerThread.value().get(), [&] (PlatformRegisters& registers) -> void {
+            ThreadSuspendLocker locker;
+            sendMessage(locker, *optionalOwnerThread.value().get(), [&] (PlatformRegisters& registers) -> void {
                 auto signalContext = SignalContext::tryCreate(registers);
                 if (!signalContext)
                     return;

Modified: branches/safari-613-branch/Source/_javascript_Core/wasm/WasmMachineThreads.cpp (289556 => 289557)


--- branches/safari-613-branch/Source/_javascript_Core/wasm/WasmMachineThreads.cpp	2022-02-10 19:12:19 UTC (rev 289556)
+++ branches/safari-613-branch/Source/_javascript_Core/wasm/WasmMachineThreads.cpp	2022-02-10 19:12:24 UTC (rev 289557)
@@ -54,8 +54,9 @@
 void resetInstructionCacheOnAllThreads()
 {
     Locker locker { wasmThreads().getLock() };
+    ThreadSuspendLocker threadSuspendLocker;
     for (auto& thread : wasmThreads().threads(locker)) {
-        sendMessage(thread.get(), [] (const PlatformRegisters&) {
+        sendMessage(threadSuspendLocker, thread.get(), [] (const PlatformRegisters&) {
             // It's likely that the signal handler will already reset the instruction cache but we might as well be sure.
             WTF::crossModifyingCodeFence();
         });

Modified: branches/safari-613-branch/Source/WTF/wtf/ThreadMessage.cpp (289556 => 289557)


--- branches/safari-613-branch/Source/WTF/wtf/ThreadMessage.cpp	2022-02-10 19:12:19 UTC (rev 289556)
+++ branches/safari-613-branch/Source/WTF/wtf/ThreadMessage.cpp	2022-02-10 19:12:24 UTC (rev 289557)
@@ -31,21 +31,18 @@
 
 namespace WTF {
 
-MessageStatus sendMessageScoped(Thread& thread, const ThreadMessage& message)
+MessageStatus sendMessageScoped(const ThreadSuspendLocker& locker, Thread& thread, const ThreadMessage& message)
 {
-    static Lock messageLock;
-    Locker locker { messageLock };
-
-    auto result = thread.suspend();
+    auto result = thread.suspend(locker);
     if (!result)
         return MessageStatus::ThreadExited;
 
     PlatformRegisters registers;
-    thread.getRegisters(registers);
+    thread.getRegisters(locker, registers);
 
     message(registers);
 
-    thread.resume();
+    thread.resume(locker);
     return MessageStatus::MessageRan;
 }
 

Modified: branches/safari-613-branch/Source/WTF/wtf/ThreadMessage.h (289556 => 289557)


--- branches/safari-613-branch/Source/WTF/wtf/ThreadMessage.h	2022-02-10 19:12:19 UTC (rev 289556)
+++ branches/safari-613-branch/Source/WTF/wtf/ThreadMessage.h	2022-02-10 19:12:24 UTC (rev 289557)
@@ -40,13 +40,13 @@
 // This method allows us to send a message which will be run in a signal handler on the desired thread.
 // There are several caveates to this method however, This function uses signals so your message should
 // be sync signal safe.
-WTF_EXPORT_PRIVATE MessageStatus sendMessageScoped(Thread&, const ThreadMessage&);
+WTF_EXPORT_PRIVATE MessageStatus sendMessageScoped(const ThreadSuspendLocker&, Thread&, const ThreadMessage&);
 
 template<typename Functor>
-MessageStatus sendMessage(Thread& targetThread, const Functor& func)
+MessageStatus sendMessage(const ThreadSuspendLocker& locker, Thread& targetThread, const Functor& func)
 {
     auto lambda = scopedLambdaRef<void(PlatformRegisters&)>(func);
-    return sendMessageScoped(targetThread, lambda);
+    return sendMessageScoped(locker, targetThread, lambda);
 }
 
 } // namespace WTF

Modified: branches/safari-613-branch/Source/WTF/wtf/Threading.cpp (289556 => 289557)


--- branches/safari-613-branch/Source/WTF/wtf/Threading.cpp	2022-02-10 19:12:19 UTC (rev 289556)
+++ branches/safari-613-branch/Source/WTF/wtf/Threading.cpp	2022-02-10 19:12:24 UTC (rev 289557)
@@ -44,10 +44,54 @@
 #include <wtf/linux/RealTimeThreads.h>
 #endif
 
+#if !USE(SYSTEM_MALLOC)
+#include <bmalloc/BPlatform.h>
+#if BENABLE(LIBPAS)
+#define USE_LIBPAS_THREAD_SUSPEND_LOCK 1
+#include <bmalloc/pas_thread_suspend_lock.h>
+#endif
+#endif
+
 namespace WTF {
 
 Lock Thread::s_allThreadsLock;
 
+
+// During suspend, suspend or resume should not be executed from the other threads.
+// We use global lock instead of per thread lock.
+// Consider the following case, there are threads A and B.
+// And A attempt to suspend B and B attempt to suspend A.
+// A and B send signals. And later, signals are delivered to A and B.
+// In that case, both will be suspended.
+//
+// And it is important to use a global lock to suspend and resume. Let's consider using per-thread lock.
+// Your issuing thread (A) attempts to suspend the target thread (B). Then, you will suspend the thread (C) additionally.
+// This case frequently happens if you stop threads to perform stack scanning. But thread (B) may hold the lock of thread (C).
+// In that case, dead lock happens. Using global lock here avoids this dead lock.
+#if USE(LIBPAS_THREAD_SUSPEND_LOCK)
+ThreadSuspendLocker::ThreadSuspendLocker()
+{
+    pas_thread_suspend_lock_lock();
+}
+
+ThreadSuspendLocker::~ThreadSuspendLocker()
+{
+    pas_thread_suspend_lock_unlock();
+}
+#else
+static Lock globalSuspendLock;
+
+ThreadSuspendLocker::ThreadSuspendLocker()
+{
+    globalSuspendLock.lock();
+}
+
+ThreadSuspendLocker::~ThreadSuspendLocker()
+{
+    globalSuspendLock.unlock();
+}
+#endif
+
 static std::optional<size_t> stackSize(ThreadType threadType)
 {
     // Return the stack size for the created thread based on its type.

Modified: branches/safari-613-branch/Source/WTF/wtf/Threading.h (289556 => 289557)


--- branches/safari-613-branch/Source/WTF/wtf/Threading.h	2022-02-10 19:12:19 UTC (rev 289556)
+++ branches/safari-613-branch/Source/WTF/wtf/Threading.h	2022-02-10 19:12:24 UTC (rev 289557)
@@ -95,6 +95,13 @@
     Audio,
 };
 
+class ThreadSuspendLocker {
+    WTF_MAKE_NONCOPYABLE(ThreadSuspendLocker);
+public:
+    WTF_EXPORT_PRIVATE ThreadSuspendLocker();
+    WTF_EXPORT_PRIVATE ~ThreadSuspendLocker();
+};
+
 class Thread : public ThreadSafeRefCounted<Thread> {
     static std::atomic<uint32_t> s_uid;
 public:
@@ -171,9 +178,9 @@
     using PlatformSuspendError = DWORD;
 #endif
 
-    WTF_EXPORT_PRIVATE Expected<void, PlatformSuspendError> suspend();
-    WTF_EXPORT_PRIVATE void resume();
-    WTF_EXPORT_PRIVATE size_t getRegisters(PlatformRegisters&);
+    WTF_EXPORT_PRIVATE Expected<void, PlatformSuspendError> suspend(const ThreadSuspendLocker&);
+    WTF_EXPORT_PRIVATE void resume(const ThreadSuspendLocker&);
+    WTF_EXPORT_PRIVATE size_t getRegisters(const ThreadSuspendLocker&, PlatformRegisters&);
 
 #if USE(PTHREADS)
 #if OS(LINUX)
@@ -422,6 +429,7 @@
 
 } // namespace WTF
 
+using WTF::ThreadSuspendLocker;
 using WTF::Thread;
 using WTF::ThreadType;
 using WTF::GCThreadType;

Modified: branches/safari-613-branch/Source/WTF/wtf/posix/ThreadingPOSIX.cpp (289556 => 289557)


--- branches/safari-613-branch/Source/WTF/wtf/posix/ThreadingPOSIX.cpp	2022-02-10 19:12:19 UTC (rev 289556)
+++ branches/safari-613-branch/Source/WTF/wtf/posix/ThreadingPOSIX.cpp	2022-02-10 19:12:24 UTC (rev 289557)
@@ -78,8 +78,6 @@
 
 namespace WTF {
 
-static Lock globalSuspendLock;
-
 Thread::~Thread()
 {
 }
@@ -403,21 +401,9 @@
     return !errNo; // A 0 errNo means success.
 }
 
-auto Thread::suspend() -> Expected<void, PlatformSuspendError>
+auto Thread::suspend(const ThreadSuspendLocker&) -> Expected<void, PlatformSuspendError>
 {
     RELEASE_ASSERT_WITH_MESSAGE(this != &Thread::current(), "We do not support suspending the current thread itself.");
-    // During suspend, suspend or resume should not be executed from the other threads.
-    // We use global lock instead of per thread lock.
-    // Consider the following case, there are threads A and B.
-    // And A attempt to suspend B and B attempt to suspend A.
-    // A and B send signals. And later, signals are delivered to A and B.
-    // In that case, both will be suspended.
-    //
-    // And it is important to use a global lock to suspend and resume. Let's consider using per-thread lock.
-    // Your issuing thread (A) attempts to suspend the target thread (B). Then, you will suspend the thread (C) additionally.
-    // This case frequently happens if you stop threads to perform stack scanning. But thread (B) may hold the lock of thread (C).
-    // In that case, dead lock happens. Using global lock here avoids this dead lock.
-    Locker locker { globalSuspendLock };
 #if OS(DARWIN)
     kern_return_t result = thread_suspend(m_platformThread);
     if (result != KERN_SUCCESS)
@@ -445,10 +431,8 @@
 #endif
 }
 
-void Thread::resume()
+void Thread::resume(const ThreadSuspendLocker&)
 {
-    // During resume, suspend or resume should not be executed from the other threads.
-    Locker locker { globalSuspendLock };
 #if OS(DARWIN)
     thread_resume(m_platformThread);
 #else
@@ -504,9 +488,8 @@
 }
 #endif // OS(DARWIN)
 
-size_t Thread::getRegisters(PlatformRegisters& registers)
+size_t Thread::getRegisters(const ThreadSuspendLocker&, PlatformRegisters& registers)
 {
-    Locker locker { globalSuspendLock };
 #if OS(DARWIN)
     auto metadata = threadStateMetadata();
     kern_return_t result = thread_get_state(m_platformThread, metadata.flavor, (thread_state_t)&registers, &metadata.userCount);

Modified: branches/safari-613-branch/Source/WTF/wtf/win/ThreadingWin.cpp (289556 => 289557)


--- branches/safari-613-branch/Source/WTF/wtf/win/ThreadingWin.cpp	2022-02-10 19:12:19 UTC (rev 289556)
+++ branches/safari-613-branch/Source/WTF/wtf/win/ThreadingWin.cpp	2022-02-10 19:12:24 UTC (rev 289557)
@@ -98,8 +98,6 @@
 
 namespace WTF {
 
-static Lock globalSuspendLock;
-
 Thread::~Thread()
 {
     // It is OK because FLSAlloc's callback will be called even before there are some open handles.
@@ -211,10 +209,9 @@
         didBecomeDetached();
 }
 
-auto Thread::suspend() -> Expected<void, PlatformSuspendError>
+auto Thread::suspend(const ThreadSuspendLocker&) -> Expected<void, PlatformSuspendError>
 {
     RELEASE_ASSERT_WITH_MESSAGE(this != &Thread::current(), "We do not support suspending the current thread itself.");
-    Locker locker { globalSuspendLock };
     DWORD result = SuspendThread(m_handle);
     if (result != (DWORD)-1)
         return { };
@@ -222,15 +219,13 @@
 }
 
 // During resume, suspend or resume should not be executed from the other threads.
-void Thread::resume()
+void Thread::resume(const ThreadSuspendLocker&)
 {
-    Locker locker { globalSuspendLock };
     ResumeThread(m_handle);
 }
 
-size_t Thread::getRegisters(PlatformRegisters& registers)
+size_t Thread::getRegisters(const ThreadSuspendLocker&, PlatformRegisters& registers)
 {
-    Locker locker { globalSuspendLock };
     registers.ContextFlags = CONTEXT_INTEGER | CONTEXT_CONTROL;
     GetThreadContext(m_handle, &registers);
     return sizeof(CONTEXT);

Modified: branches/safari-613-branch/Source/bmalloc/CMakeLists.txt (289556 => 289557)


--- branches/safari-613-branch/Source/bmalloc/CMakeLists.txt	2022-02-10 19:12:19 UTC (rev 289556)
+++ branches/safari-613-branch/Source/bmalloc/CMakeLists.txt	2022-02-10 19:12:24 UTC (rev 289557)
@@ -171,6 +171,7 @@
     libpas/src/libpas/pas_status_reporter.c
     libpas/src/libpas/pas_stream.c
     libpas/src/libpas/pas_string_stream.c
+    libpas/src/libpas/pas_thread_suspend_lock.c
     libpas/src/libpas/pas_thread_local_cache.c
     libpas/src/libpas/pas_thread_local_cache_layout.c
     libpas/src/libpas/pas_thread_local_cache_layout_node.c
@@ -613,6 +614,7 @@
     libpas/src/libpas/pas_status_reporter.h
     libpas/src/libpas/pas_stream.h
     libpas/src/libpas/pas_string_stream.h
+    libpas/src/libpas/pas_thread_suspend_lock.h
     libpas/src/libpas/pas_thread_local_cache.h
     libpas/src/libpas/pas_thread_local_cache_layout.h
     libpas/src/libpas/pas_thread_local_cache_layout_node.h

Modified: branches/safari-613-branch/Source/bmalloc/bmalloc.xcodeproj/project.pbxproj (289556 => 289557)


--- branches/safari-613-branch/Source/bmalloc/bmalloc.xcodeproj/project.pbxproj	2022-02-10 19:12:19 UTC (rev 289556)
+++ branches/safari-613-branch/Source/bmalloc/bmalloc.xcodeproj/project.pbxproj	2022-02-10 19:12:24 UTC (rev 289557)
@@ -644,6 +644,8 @@
 		DE8B13B321CC5D9F00A63FCD /* BVMTags.h in Headers */ = {isa = PBXBuildFile; fileRef = DE8B13B221CC5D9F00A63FCD /* BVMTags.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		E31E74802238CA5C005D084A /* StaticPerProcess.h in Headers */ = {isa = PBXBuildFile; fileRef = E31E747F2238CA5B005D084A /* StaticPerProcess.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		E328D84D23CEB38900545B18 /* Packed.h in Headers */ = {isa = PBXBuildFile; fileRef = E328D84C23CEB38900545B18 /* Packed.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		E35B7BCA27ADB44E00C3498F /* pas_thread_suspend_lock.h in Headers */ = {isa = PBXBuildFile; fileRef = E35B7BC827ADB44E00C3498F /* pas_thread_suspend_lock.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		E35B7BCB27ADB44E00C3498F /* pas_thread_suspend_lock.c in Sources */ = {isa = PBXBuildFile; fileRef = E35B7BC927ADB44E00C3498F /* pas_thread_suspend_lock.c */; };
 		E378A9DF246B68720029C2BB /* ObjectTypeTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E378A9DE246B686A0029C2BB /* ObjectTypeTable.cpp */; };
 		E378A9E0246B68750029C2BB /* ObjectTypeTable.h in Headers */ = {isa = PBXBuildFile; fileRef = E378A9DD246B686A0029C2BB /* ObjectTypeTable.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		E38A9E3C27426514000BBD49 /* pas_platform.h in Headers */ = {isa = PBXBuildFile; fileRef = E38A9E3B27426514000BBD49 /* pas_platform.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -1308,6 +1310,8 @@
 		DE8B13B221CC5D9F00A63FCD /* BVMTags.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = BVMTags.h; path = bmalloc/BVMTags.h; sourceTree = "<group>"; };
 		E31E747F2238CA5B005D084A /* StaticPerProcess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StaticPerProcess.h; path = bmalloc/StaticPerProcess.h; sourceTree = "<group>"; };
 		E328D84C23CEB38900545B18 /* Packed.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Packed.h; path = bmalloc/Packed.h; sourceTree = "<group>"; };
+		E35B7BC827ADB44E00C3498F /* pas_thread_suspend_lock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = pas_thread_suspend_lock.h; path = libpas/src/libpas/pas_thread_suspend_lock.h; sourceTree = "<group>"; };
+		E35B7BC927ADB44E00C3498F /* pas_thread_suspend_lock.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pas_thread_suspend_lock.c; path = libpas/src/libpas/pas_thread_suspend_lock.c; sourceTree = "<group>"; };
 		E378A9DD246B686A0029C2BB /* ObjectTypeTable.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ObjectTypeTable.h; path = bmalloc/ObjectTypeTable.h; sourceTree = "<group>"; };
 		E378A9DE246B686A0029C2BB /* ObjectTypeTable.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = ObjectTypeTable.cpp; path = bmalloc/ObjectTypeTable.cpp; sourceTree = "<group>"; };
 		E38A9E3B27426514000BBD49 /* pas_platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = pas_platform.h; path = libpas/src/libpas/pas_platform.h; sourceTree = "<group>"; };
@@ -1415,45 +1419,45 @@
 		0FC4090E2451492E00876DA0 /* libpas */ = {
 			isa = PBXGroup;
 			children = (
+				0F8A812725F83E2500790B4A /* bmalloc_heap.c */,
+				0F8A812525F83E2400790B4A /* bmalloc_heap.h */,
 				0F8A811D25F83E2400790B4A /* bmalloc_heap_config.c */,
 				0F8A812925F83E2500790B4A /* bmalloc_heap_config.h */,
 				0F8A811B25F83E2300790B4A /* bmalloc_heap_inlines.h */,
 				0F8A811F25F83E2400790B4A /* bmalloc_heap_innards.h */,
 				0F8A812325F83E2400790B4A /* bmalloc_heap_ref.h */,
-				0F8A812725F83E2500790B4A /* bmalloc_heap.c */,
-				0F8A812525F83E2400790B4A /* bmalloc_heap.h */,
 				2C11E8932728DE27002162D0 /* bmalloc_type.c */,
 				2C11E8922728DE27002162D0 /* bmalloc_type.h */,
+				0F8A812025F83E2400790B4A /* hotbit_heap.c */,
+				0F8A812625F83E2400790B4A /* hotbit_heap.h */,
 				0F8A811E25F83E2400790B4A /* hotbit_heap_config.c */,
 				0F8A812125F83E2400790B4A /* hotbit_heap_config.h */,
 				0F8A811C25F83E2400790B4A /* hotbit_heap_inlines.h */,
 				0F8A812225F83E2400790B4A /* hotbit_heap_innards.h */,
-				0F8A812025F83E2400790B4A /* hotbit_heap.c */,
-				0F8A812625F83E2400790B4A /* hotbit_heap.h */,
+				0FC409212451494200876DA0 /* iso_heap.c */,
+				0FC409292451494300876DA0 /* iso_heap.h */,
 				0FC4092F2451494300876DA0 /* iso_heap_config.c */,
 				0FC409252451494300876DA0 /* iso_heap_config.h */,
 				0F5FE7B625B61EC1001859FC /* iso_heap_inlines.h */,
 				0F516EE824561AE8004E2B8D /* iso_heap_innards.h */,
 				0F529DE02455463F00385A8C /* iso_heap_ref.h */,
-				0FC409212451494200876DA0 /* iso_heap.c */,
-				0FC409292451494300876DA0 /* iso_heap.h */,
+				0FC4090F2451494200876DA0 /* iso_test_heap.c */,
+				0FC409102451494200876DA0 /* iso_test_heap.h */,
 				0FC409372451494400876DA0 /* iso_test_heap_config.c */,
 				0FC409232451494200876DA0 /* iso_test_heap_config.h */,
-				0FC4090F2451494200876DA0 /* iso_test_heap.c */,
-				0FC409102451494200876DA0 /* iso_test_heap.h */,
-				0F5193EA266C42AC00483A2C /* jit_heap_config_root_data.h */,
+				0F5193EC266C42AC00483A2C /* jit_heap.c */,
+				0F5193E9266C42AC00483A2C /* jit_heap.h */,
 				0F5193EB266C42AC00483A2C /* jit_heap_config.c */,
 				0F5193E8266C42AC00483A2C /* jit_heap_config.h */,
-				0F5193EC266C42AC00483A2C /* jit_heap.c */,
-				0F5193E9266C42AC00483A2C /* jit_heap.h */,
+				0F5193EA266C42AC00483A2C /* jit_heap_config_root_data.h */,
+				0F18F83D25C3467700721C2A /* minalign32_heap.c */,
+				0F18F84125C3467700721C2A /* minalign32_heap.h */,
 				0F18F84425C3467700721C2A /* minalign32_heap_config.c */,
 				0F18F84225C3467700721C2A /* minalign32_heap_config.h */,
-				0F18F83D25C3467700721C2A /* minalign32_heap.c */,
-				0F18F84125C3467700721C2A /* minalign32_heap.h */,
+				0F18F83E25C3467700721C2A /* pagesize64k_heap.c */,
+				0F18F84325C3467700721C2A /* pagesize64k_heap.h */,
 				0F18F84025C3467700721C2A /* pagesize64k_heap_config.c */,
 				0F18F83F25C3467700721C2A /* pagesize64k_heap_config.h */,
-				0F18F83E25C3467700721C2A /* pagesize64k_heap.c */,
-				0F18F84325C3467700721C2A /* pagesize64k_heap.h */,
 				0FC4092A2451494300876DA0 /* pas_aligned_allocation_result.h */,
 				0FC4092B2451494300876DA0 /* pas_aligned_allocator.h */,
 				0FC4092D2451494300876DA0 /* pas_alignment.c */,
@@ -1471,11 +1475,11 @@
 				0FC409AA2451496200876DA0 /* pas_allocator_counts.h */,
 				0F7549802486973C002A4C7D /* pas_allocator_index.h */,
 				0FC4098D2451496000876DA0 /* pas_allocator_scavenge_action.h */,
+				0FC409842451495F00876DA0 /* pas_baseline_allocator.c */,
+				0FC409A22451496100876DA0 /* pas_baseline_allocator.h */,
 				0FC409822451495F00876DA0 /* pas_baseline_allocator_result.h */,
 				0FC409972451496100876DA0 /* pas_baseline_allocator_table.c */,
 				0FC4097B2451495F00876DA0 /* pas_baseline_allocator_table.h */,
-				0FC409842451495F00876DA0 /* pas_baseline_allocator.c */,
-				0FC409A22451496100876DA0 /* pas_baseline_allocator.h */,
 				0F5193ED266C42AD00483A2C /* pas_basic_heap_config_enumerator_data.c */,
 				0F87FFCE25AF897C000E1ABF /* pas_basic_heap_config_enumerator_data.h */,
 				0F87FFAB25AF897A000E1ABF /* pas_basic_heap_config_root_data.h */,
@@ -1484,32 +1488,32 @@
 				0F87FFCC25AF897C000E1ABF /* pas_biasing_directory_kind.h */,
 				0FC409B52451496300876DA0 /* pas_bitfield_vector.h */,
 				0F87FFD625AF897C000E1ABF /* pas_bitfit_allocation_result.h */,
-				0F87FFBB25AF897B000E1ABF /* pas_bitfit_allocator_inlines.h */,
 				0F87FFCD25AF897C000E1ABF /* pas_bitfit_allocator.c */,
 				0F87FFAE25AF897A000E1ABF /* pas_bitfit_allocator.h */,
-				0F87FFB925AF897B000E1ABF /* pas_bitfit_directory_inlines.h */,
+				0F87FFBB25AF897B000E1ABF /* pas_bitfit_allocator_inlines.h */,
 				0F87FFCB25AF897C000E1ABF /* pas_bitfit_directory.c */,
 				0F87FFC225AF897B000E1ABF /* pas_bitfit_directory.h */,
+				0F87FFB925AF897B000E1ABF /* pas_bitfit_directory_inlines.h */,
 				0F87FFBD25AF897B000E1ABF /* pas_bitfit_heap.c */,
 				0F87FFC725AF897B000E1ABF /* pas_bitfit_heap.h */,
 				0F87FFC425AF897B000E1ABF /* pas_bitfit_max_free.h */,
+				0F87FFD125AF897C000E1ABF /* pas_bitfit_page.c */,
+				0F87FFC525AF897B000E1ABF /* pas_bitfit_page.h */,
+				0F87FFB525AF897A000E1ABF /* pas_bitfit_page_config.h */,
 				0F87FFD325AF897C000E1ABF /* pas_bitfit_page_config_inlines.h */,
 				0F87FFAD25AF897A000E1ABF /* pas_bitfit_page_config_kind.c */,
 				0F87FFB225AF897A000E1ABF /* pas_bitfit_page_config_kind.def */,
 				0F87FFC125AF897B000E1ABF /* pas_bitfit_page_config_kind.h */,
+				0F87FFB725AF897B000E1ABF /* pas_bitfit_page_config_utils.h */,
 				0F87FFC925AF897C000E1ABF /* pas_bitfit_page_config_utils_inlines.h */,
-				0F87FFB725AF897B000E1ABF /* pas_bitfit_page_config_utils.h */,
 				0F87FFA425AF8979000E1ABF /* pas_bitfit_page_config_variant.h */,
-				0F87FFB525AF897A000E1ABF /* pas_bitfit_page_config.h */,
 				0F87FFA125AF8979000E1ABF /* pas_bitfit_page_inlines.h */,
-				0F87FFD125AF897C000E1ABF /* pas_bitfit_page.c */,
-				0F87FFC525AF897B000E1ABF /* pas_bitfit_page.h */,
 				0F87FFAC25AF897A000E1ABF /* pas_bitfit_size_class.c */,
 				0F87FFB425AF897A000E1ABF /* pas_bitfit_size_class.h */,
+				0F87FFC825AF897C000E1ABF /* pas_bitfit_view.c */,
+				0F87FFA525AF8979000E1ABF /* pas_bitfit_view.h */,
 				0F87FFD225AF897C000E1ABF /* pas_bitfit_view_and_index.h */,
 				0F87FFD525AF897C000E1ABF /* pas_bitfit_view_inlines.h */,
-				0F87FFC825AF897C000E1ABF /* pas_bitfit_view.c */,
-				0F87FFA525AF8979000E1ABF /* pas_bitfit_view.h */,
 				0FC409A92451496200876DA0 /* pas_bitvector.h */,
 				0FC409BB2451496300876DA0 /* pas_bootstrap_free_heap.c */,
 				0FC409A72451496200876DA0 /* pas_bootstrap_free_heap.h */,
@@ -1570,23 +1574,23 @@
 				0FC4099A2451496100876DA0 /* pas_compact_unsigned_ptr.h */,
 				0FC409792451495F00876DA0 /* pas_compute_summary_object_callbacks.c */,
 				0FC409B32451496200876DA0 /* pas_compute_summary_object_callbacks.h */,
+				0FC409B82451496300876DA0 /* pas_config.h */,
 				0FC409A82451496200876DA0 /* pas_config_prefix.h */,
-				0FC409B82451496300876DA0 /* pas_config.h */,
 				0FC409A52451496200876DA0 /* pas_create_basic_heap_page_caches_with_reserved_memory.c */,
 				0FC4096F2451495E00876DA0 /* pas_create_basic_heap_page_caches_with_reserved_memory.h */,
 				0FC409982451496100876DA0 /* pas_deallocate.c */,
 				0FC4099B2451496100876DA0 /* pas_deallocate.h */,
 				0F5FE7DA25B6210D001859FC /* pas_deallocation_mode.h */,
+				0FC409A32451496100876DA0 /* pas_deallocator.h */,
 				0FC409852451496000876DA0 /* pas_deallocator_scavenge_action.h */,
-				0FC409A32451496100876DA0 /* pas_deallocator.h */,
 				0F373E532659EA700034BA96 /* pas_debug_heap.h */,
 				0FBC62C4265F180C005A5720 /* pas_debug_spectrum.c */,
 				0FBC62C5265F180C005A5720 /* pas_debug_spectrum.h */,
 				0FC409B92451496300876DA0 /* pas_deferred_decommit_log.c */,
 				0FC409A02451496100876DA0 /* pas_deferred_decommit_log.h */,
-				0F8E832B2492EAF30046D7F8 /* pas_designated_intrinsic_heap_inlines.h */,
 				0F8E83262492EAF30046D7F8 /* pas_designated_intrinsic_heap.c */,
 				0F8E83242492EAF30046D7F8 /* pas_designated_intrinsic_heap.h */,
+				0F8E832B2492EAF30046D7F8 /* pas_designated_intrinsic_heap_inlines.h */,
 				0FC4098A2451496000876DA0 /* pas_dyld_state.c */,
 				0FC4099D2451496100876DA0 /* pas_dyld_state.h */,
 				0FC409802451495F00876DA0 /* pas_dynamic_primitive_heap_map.c */,
@@ -1609,11 +1613,11 @@
 				0F87001225AF89C7000E1ABF /* pas_enumerate_segregated_heaps.h */,
 				0F87001D25AF89C8000E1ABF /* pas_enumerate_unaccounted_pages_as_meta.c */,
 				0F87001E25AF89C8000E1ABF /* pas_enumerate_unaccounted_pages_as_meta.h */,
+				0F87001425AF89C7000E1ABF /* pas_enumerator.c */,
+				0F87002725AF89C9000E1ABF /* pas_enumerator.h */,
 				0F87002825AF89C9000E1ABF /* pas_enumerator_internal.h */,
 				0F87002025AF89C8000E1ABF /* pas_enumerator_region.c */,
 				0F87002125AF89C8000E1ABF /* pas_enumerator_region.h */,
-				0F87001425AF89C7000E1ABF /* pas_enumerator.c */,
-				0F87002725AF89C9000E1ABF /* pas_enumerator.h */,
 				0FC409AF2451496200876DA0 /* pas_epoch.c */,
 				0FC409B12451496200876DA0 /* pas_epoch.h */,
 				0FC409B02451496200876DA0 /* pas_exclusive_view_template_memo_table.c */,
@@ -1629,8 +1633,8 @@
 				0F87002325AF89C8000E1ABF /* pas_fast_megapage_kind.h */,
 				0F87002225AF89C8000E1ABF /* pas_fast_megapage_table.c */,
 				0F87002425AF89C8000E1ABF /* pas_fast_megapage_table.h */,
+				0F87001625AF89C7000E1ABF /* pas_fast_path_allocation_result.h */,
 				0F87001125AF89C7000E1ABF /* pas_fast_path_allocation_result_kind.h */,
-				0F87001625AF89C7000E1ABF /* pas_fast_path_allocation_result.h */,
 				0FB5706C267D05590080FA8B /* pas_fast_tls.h */,
 				0FC40AC92451499000876DA0 /* pas_fd_stream.c */,
 				0FC40ACA2451499100876DA0 /* pas_fd_stream.h */,
@@ -1641,25 +1645,27 @@
 				0F87001F25AF89C8000E1ABF /* pas_free_granules.h */,
 				0FC40AA82451498E00876DA0 /* pas_free_mode.h */,
 				0FC40A342451498600876DA0 /* pas_free_range_kind.h */,
+				0FC40ACB2451499100876DA0 /* pas_full_alloc_bits.h */,
 				0FC40A452451498700876DA0 /* pas_full_alloc_bits_inlines.h */,
-				0FC40ACB2451499100876DA0 /* pas_full_alloc_bits.h */,
 				0FC40A3A2451498600876DA0 /* pas_generic_large_free_heap.h */,
 				0FC40A962451498D00876DA0 /* pas_get_allocation_size.h */,
 				0FC40AE12451499200876DA0 /* pas_get_heap.h */,
 				0F87001925AF89C7000E1ABF /* pas_get_object_kind.h */,
+				0F87001C25AF89C8000E1ABF /* pas_get_page_base.h */,
 				2CE2AE2B27596DEB00D02BBC /* pas_get_page_base_and_kind_for_small_other_in_fast_megapage.h */,
-				0F87001C25AF89C8000E1ABF /* pas_get_page_base.h */,
 				0FC40A722451498A00876DA0 /* pas_has_object.h */,
 				0FC40A482451498700876DA0 /* pas_hashtable.h */,
+				0FC40ACC2451499100876DA0 /* pas_heap.c */,
+				0FC40A5F2451498900876DA0 /* pas_heap.h */,
+				0F1BFD4526645AC700CEC28D /* pas_heap_config.c */,
+				0FC40AAA2451498E00876DA0 /* pas_heap_config.h */,
 				0F8E784D2478739400E124A6 /* pas_heap_config_inlines.h */,
 				0FC40A692451498A00876DA0 /* pas_heap_config_kind.c */,
 				0FC40A8D2451498C00876DA0 /* pas_heap_config_kind.def */,
 				0FC40A582451498900876DA0 /* pas_heap_config_kind.h */,
-				0FC40A422451498700876DA0 /* pas_heap_config_utils_inlines.h */,
 				0FC40A5E2451498900876DA0 /* pas_heap_config_utils.c */,
 				0FC40ADB2451499200876DA0 /* pas_heap_config_utils.h */,
-				0F1BFD4526645AC700CEC28D /* pas_heap_config.c */,
-				0FC40AAA2451498E00876DA0 /* pas_heap_config.h */,
+				0FC40A422451498700876DA0 /* pas_heap_config_utils_inlines.h */,
 				0FC40A772451498B00876DA0 /* pas_heap_for_config.c */,
 				0FC40A9A2451498D00876DA0 /* pas_heap_for_config.h */,
 				0FC40AD92451499200876DA0 /* pas_heap_inlines.h */,
@@ -1667,19 +1673,17 @@
 				0FC40AE42451499200876DA0 /* pas_heap_lock.c */,
 				0FC40A7B2451498B00876DA0 /* pas_heap_lock.h */,
 				0FC40ABA2451498F00876DA0 /* pas_heap_page_provider.h */,
+				0FC40A4F2451498800876DA0 /* pas_heap_ref.c */,
+				0FC40A662451498900876DA0 /* pas_heap_ref.h */,
 				0FC40AB52451498F00876DA0 /* pas_heap_ref_kind.h */,
 				0FC40A8E2451498C00876DA0 /* pas_heap_ref_prefix.h */,
-				0FC40A4F2451498800876DA0 /* pas_heap_ref.c */,
-				0FC40A662451498900876DA0 /* pas_heap_ref.h */,
 				0F7C92D926E57F75006AF012 /* pas_heap_runtime_config.c */,
 				0FC40AE92451499300876DA0 /* pas_heap_runtime_config.h */,
 				0FC40AF22451499300876DA0 /* pas_heap_summary.c */,
 				0FC40AD62451499100876DA0 /* pas_heap_summary.h */,
-				0FC40A4E2451498800876DA0 /* pas_heap_table_state.h */,
 				0FC40AC62451499000876DA0 /* pas_heap_table.c */,
 				0FC40A2E2451498600876DA0 /* pas_heap_table.h */,
-				0FC40ACC2451499100876DA0 /* pas_heap.c */,
-				0FC40A5F2451498900876DA0 /* pas_heap.h */,
+				0FC40A4E2451498800876DA0 /* pas_heap_table_state.h */,
 				0FC40A642451498900876DA0 /* pas_immortal_heap.c */,
 				0FC40A9F2451498D00876DA0 /* pas_immortal_heap.h */,
 				0FC40A942451498D00876DA0 /* pas_immutable_vector.h */,
@@ -1687,6 +1691,7 @@
 				0FC40A512451498800876DA0 /* pas_intrinsic_heap_support.h */,
 				2C48133B27406A3E006CAB55 /* pas_large_expendable_memory.c */,
 				2C48133F27406A3E006CAB55 /* pas_large_expendable_memory.h */,
+				0FC40A9C2451498D00876DA0 /* pas_large_free.h */,
 				0FC40A542451498800876DA0 /* pas_large_free_heap_config.h */,
 				0FABDDCF248AB08400A840B3 /* pas_large_free_heap_declarations.def */,
 				0FC40ACD2451499100876DA0 /* pas_large_free_heap_deferred_commit_log.c */,
@@ -1696,25 +1701,26 @@
 				0FABDDCE248AB08400A840B3 /* pas_large_free_heap_helpers.h */,
 				0FC40A742451498A00876DA0 /* pas_large_free_inlines.h */,
 				0FC40A232451498500876DA0 /* pas_large_free_visitor.h */,
-				0FC40A9C2451498D00876DA0 /* pas_large_free.h */,
+				0FC40A932451498D00876DA0 /* pas_large_heap.c */,
+				0FC40A7A2451498B00876DA0 /* pas_large_heap.h */,
 				0FC40A832451498B00876DA0 /* pas_large_heap_physical_page_sharing_cache.c */,
 				0FC40AB02451498F00876DA0 /* pas_large_heap_physical_page_sharing_cache.h */,
-				0FC40A932451498D00876DA0 /* pas_large_heap.c */,
-				0FC40A7A2451498B00876DA0 /* pas_large_heap.h */,
-				0FC40AD42451499100876DA0 /* pas_large_map_entry.h */,
 				0FC40AF42451499400876DA0 /* pas_large_map.c */,
 				0FC40A362451498600876DA0 /* pas_large_map.h */,
-				0FC40ABD2451499000876DA0 /* pas_large_sharing_pool_epoch_update_mode.h */,
+				0FC40AD42451499100876DA0 /* pas_large_map_entry.h */,
 				0FC40A4B2451498800876DA0 /* pas_large_sharing_pool.c */,
 				0FC40A1D2451498400876DA0 /* pas_large_sharing_pool.h */,
+				0FC40ABD2451499000876DA0 /* pas_large_sharing_pool_epoch_update_mode.h */,
 				0FC40AA32451498E00876DA0 /* pas_large_utility_free_heap.c */,
 				0FC40AF12451499300876DA0 /* pas_large_utility_free_heap.h */,
+				2C971D01278E798700C9E129 /* pas_lenient_compact_ptr.h */,
 				2C971D00278E798700C9E129 /* pas_lenient_compact_ptr_inlines.h */,
-				2C971D01278E798700C9E129 /* pas_lenient_compact_ptr.h */,
 				2C971D03278E798700C9E129 /* pas_lenient_compact_unsigned_ptr.c */,
 				2C971D02278E798700C9E129 /* pas_lenient_compact_unsigned_ptr.h */,
 				0F8A812425F83E2400790B4A /* pas_line_word_config.h */,
 				0FC40A7D2451498B00876DA0 /* pas_list_direction.h */,
+				0FC40A282451498500876DA0 /* pas_local_allocator.c */,
+				0FC40A4A2451498800876DA0 /* pas_local_allocator.h */,
 				0FC40A4C2451498800876DA0 /* pas_local_allocator_config_kind.h */,
 				0FC40A982451498D00876DA0 /* pas_local_allocator_inlines.h */,
 				0F7C92E026E57F75006AF012 /* pas_local_allocator_kind.h */,
@@ -1722,16 +1728,14 @@
 				0FC40A502451498800876DA0 /* pas_local_allocator_result.h */,
 				0F7C92DA26E57F75006AF012 /* pas_local_allocator_scavenger_data.c */,
 				0F7C92D426E57F74006AF012 /* pas_local_allocator_scavenger_data.h */,
-				0FC40A282451498500876DA0 /* pas_local_allocator.c */,
-				0FC40A4A2451498800876DA0 /* pas_local_allocator.h */,
+				0F7C92D626E57F75006AF012 /* pas_local_view_cache.c */,
+				0F7C92DE26E57F75006AF012 /* pas_local_view_cache.h */,
 				0F7C92E126E57F75006AF012 /* pas_local_view_cache_node.c */,
 				0F7C92DC26E57F75006AF012 /* pas_local_view_cache_node.h */,
-				0F7C92D626E57F75006AF012 /* pas_local_view_cache.c */,
-				0F7C92DE26E57F75006AF012 /* pas_local_view_cache.h */,
+				0FC40BD9245243A400876DA0 /* pas_lock.c */,
+				0FC40A8B2451498C00876DA0 /* pas_lock.h */,
 				0FC40A562451498800876DA0 /* pas_lock_free_read_ptr_ptr_hashtable.c */,
 				0FC40AA42451498E00876DA0 /* pas_lock_free_read_ptr_ptr_hashtable.h */,
-				0FC40BD9245243A400876DA0 /* pas_lock.c */,
-				0FC40A8B2451498C00876DA0 /* pas_lock.h */,
 				0FC40AD72451499100876DA0 /* pas_log.c */,
 				0FC40AC12451499000876DA0 /* pas_log.h */,
 				0F87004B25AF8A19000E1ABF /* pas_medium_megapage_cache.c */,
@@ -1743,15 +1747,15 @@
 				0FC40A712451498A00876DA0 /* pas_monotonic_time.h */,
 				0FC40AD22451499100876DA0 /* pas_mutation_count.h */,
 				0F87004E25AF8A19000E1ABF /* pas_object_kind.h */,
+				0F87005225AF8A1A000E1ABF /* pas_page_base.c */,
+				0F87005D25AF8A1A000E1ABF /* pas_page_base.h */,
 				2CE2AE2727596DEA00D02BBC /* pas_page_base_and_kind.h */,
+				2CE2AE2827596DEA00D02BBC /* pas_page_base_config.c */,
+				0F87006025AF8A1B000E1ABF /* pas_page_base_config.h */,
 				0F87005E25AF8A1B000E1ABF /* pas_page_base_config_inlines.h */,
+				0F87004D25AF8A19000E1ABF /* pas_page_base_config_utils.h */,
 				0F87005625AF8A1A000E1ABF /* pas_page_base_config_utils_inlines.h */,
-				0F87004D25AF8A19000E1ABF /* pas_page_base_config_utils.h */,
-				2CE2AE2827596DEA00D02BBC /* pas_page_base_config.c */,
-				0F87006025AF8A1B000E1ABF /* pas_page_base_config.h */,
 				0F87005025AF8A1A000E1ABF /* pas_page_base_inlines.h */,
-				0F87005225AF8A1A000E1ABF /* pas_page_base.c */,
-				0F87005D25AF8A1A000E1ABF /* pas_page_base.h */,
 				0F87004A25AF8A19000E1ABF /* pas_page_config_kind.h */,
 				0F87006225AF8A1B000E1ABF /* pas_page_granule_use_count.h */,
 				0F87004925AF8A19000E1ABF /* pas_page_header_placement_mode.h */,
@@ -1761,13 +1765,13 @@
 				0FC40A892451498C00876DA0 /* pas_page_malloc.c */,
 				0FC40AF52451499400876DA0 /* pas_page_malloc.h */,
 				0F87005B25AF8A1A000E1ABF /* pas_page_sharing_mode.h */,
-				0FC40AA02451498E00876DA0 /* pas_page_sharing_participant_kind.h */,
 				0FC40A332451498600876DA0 /* pas_page_sharing_participant.c */,
 				0FC40A4D2451498800876DA0 /* pas_page_sharing_participant.h */,
+				0FC40AA02451498E00876DA0 /* pas_page_sharing_participant_kind.h */,
+				0FC40AAF2451498F00876DA0 /* pas_page_sharing_pool.c */,
+				0FC40AA92451498E00876DA0 /* pas_page_sharing_pool.h */,
 				0F7C92D226E57F74006AF012 /* pas_page_sharing_pool_scavenge_result.h */,
 				0FC40A732451498A00876DA0 /* pas_page_sharing_pool_take_result.h */,
-				0FC40AAF2451498F00876DA0 /* pas_page_sharing_pool.c */,
-				0FC40AA92451498E00876DA0 /* pas_page_sharing_pool.h */,
 				0F87004C25AF8A19000E1ABF /* pas_payload_reservation_page_list.c */,
 				0F87005C25AF8A1A000E1ABF /* pas_payload_reservation_page_list.h */,
 				0FC40A372451498600876DA0 /* pas_physical_memory_synchronization_style.h */,
@@ -1788,11 +1792,11 @@
 				0FC40A402451498700876DA0 /* pas_race_test_hooks.h */,
 				0FC40A1F2451498500876DA0 /* pas_random.c */,
 				0FC40A842451498C00876DA0 /* pas_random.h */,
+				0FC40A272451498500876DA0 /* pas_range.h */,
+				0FC40A752451498B00876DA0 /* pas_range16.h */,
 				0F87005425AF8A1A000E1ABF /* pas_range_begin_min_heap.h */,
 				0FC40AD82451499200876DA0 /* pas_range_locked_mode.h */,
 				0FC40ABC2451499000876DA0 /* pas_range_min_heap.h */,
-				0FC40A272451498500876DA0 /* pas_range.h */,
-				0FC40A752451498B00876DA0 /* pas_range16.h */,
 				0FC40A442451498700876DA0 /* pas_reallocate_free_mode.h */,
 				0FC40A862451498C00876DA0 /* pas_reallocate_heap_teleport_rule.h */,
 				0FC40ABF2451499000876DA0 /* pas_red_black_tree.c */,
@@ -1808,57 +1812,57 @@
 				0FC40A702451498A00876DA0 /* pas_segmented_vector.h */,
 				2CE2AE2C27596DEB00D02BBC /* pas_segregated_deallocation_logging_mode.h */,
 				0F7C92D526E57F74006AF012 /* pas_segregated_deallocation_mode.h */,
+				0FC40A242451498500876DA0 /* pas_segregated_directory.c */,
+				0FC40A6F2451498A00876DA0 /* pas_segregated_directory.h */,
 				0FC40A902451498C00876DA0 /* pas_segregated_directory_bit_reference.h */,
 				0F87005825AF8A1A000E1ABF /* pas_segregated_directory_first_eligible_kind.h */,
 				0FC40A802451498B00876DA0 /* pas_segregated_directory_inlines.h */,
 				0FC40AEE2451499300876DA0 /* pas_segregated_directory_kind.h */,
-				0FC40A242451498500876DA0 /* pas_segregated_directory.c */,
-				0FC40A6F2451498A00876DA0 /* pas_segregated_directory.h */,
-				0F18F83C25C3467700721C2A /* pas_segregated_exclusive_view_inlines.h */,
 				0FC40AE62451499300876DA0 /* pas_segregated_exclusive_view.c */,
 				0FC40A6B2451498A00876DA0 /* pas_segregated_exclusive_view.h */,
+				0F18F83C25C3467700721C2A /* pas_segregated_exclusive_view_inlines.h */,
+				0FC40ADC2451499200876DA0 /* pas_segregated_heap.c */,
+				0FC40A2F2451498600876DA0 /* pas_segregated_heap.h */,
 				0FC40A202451498500876DA0 /* pas_segregated_heap_inlines.h */,
 				0FC40A7F2451498B00876DA0 /* pas_segregated_heap_lookup_kind.h */,
-				0FC40ADC2451499200876DA0 /* pas_segregated_heap.c */,
-				0FC40A2F2451498600876DA0 /* pas_segregated_heap.h */,
+				0FC40ADF2451499200876DA0 /* pas_segregated_page.c */,
+				0FC40A382451498600876DA0 /* pas_segregated_page.h */,
 				0F5FE7D125B6210C001859FC /* pas_segregated_page_and_config.h */,
+				0FC40A412451498700876DA0 /* pas_segregated_page_config.c */,
+				0FC40AD12451499100876DA0 /* pas_segregated_page_config.h */,
 				0FC40ADA2451499200876DA0 /* pas_segregated_page_config_inlines.h */,
-				2CE2AE2A27596DEA00D02BBC /* pas_segregated_page_config_kind_and_role.c */,
-				2CE2AE2927596DEA00D02BBC /* pas_segregated_page_config_kind_and_role.h */,
 				0FC40AE52451499300876DA0 /* pas_segregated_page_config_kind.c */,
 				0FC40A762451498B00876DA0 /* pas_segregated_page_config_kind.def */,
 				0FC40A5A2451498900876DA0 /* pas_segregated_page_config_kind.h */,
+				2CE2AE2A27596DEA00D02BBC /* pas_segregated_page_config_kind_and_role.c */,
+				2CE2AE2927596DEA00D02BBC /* pas_segregated_page_config_kind_and_role.h */,
+				0FC40A972451498D00876DA0 /* pas_segregated_page_config_utils.h */,
 				0FC40A552451498800876DA0 /* pas_segregated_page_config_utils_inlines.h */,
-				0FC40A972451498D00876DA0 /* pas_segregated_page_config_utils.h */,
 				0F5FE7C925B6210B001859FC /* pas_segregated_page_config_variant.h */,
-				0FC40A412451498700876DA0 /* pas_segregated_page_config.c */,
-				0FC40AD12451499100876DA0 /* pas_segregated_page_config.h */,
 				0FC40AAC2451498E00876DA0 /* pas_segregated_page_emptiness_kind.h */,
 				0FC40ADD2451499200876DA0 /* pas_segregated_page_inlines.h */,
 				2CE2AE2627596DEA00D02BBC /* pas_segregated_page_role.h */,
-				0FC40ADF2451499200876DA0 /* pas_segregated_page.c */,
-				0FC40A382451498600876DA0 /* pas_segregated_page.h */,
-				0FC40ADE2451499200876DA0 /* pas_segregated_partial_view_inlines.h */,
 				0FC40A3C2451498700876DA0 /* pas_segregated_partial_view.c */,
 				0FC40A212451498500876DA0 /* pas_segregated_partial_view.h */,
-				0FC40AF72451499400876DA0 /* pas_segregated_shared_handle_inlines.h */,
+				0FC40ADE2451499200876DA0 /* pas_segregated_partial_view_inlines.h */,
 				0FC40AF32451499400876DA0 /* pas_segregated_shared_handle.c */,
 				0FC40A6A2451498A00876DA0 /* pas_segregated_shared_handle.h */,
+				0FC40AF72451499400876DA0 /* pas_segregated_shared_handle_inlines.h */,
 				0FC40A532451498800876DA0 /* pas_segregated_shared_page_directory.c */,
 				0FC40ABB2451498F00876DA0 /* pas_segregated_shared_page_directory.h */,
-				0FC40A882451498C00876DA0 /* pas_segregated_shared_view_inlines.h */,
 				0FC40A492451498700876DA0 /* pas_segregated_shared_view.c */,
 				0FC40A322451498600876DA0 /* pas_segregated_shared_view.h */,
+				0FC40A882451498C00876DA0 /* pas_segregated_shared_view_inlines.h */,
+				0FC40AAB2451498E00876DA0 /* pas_segregated_size_directory.c */,
+				0FC40AF62451499400876DA0 /* pas_segregated_size_directory.h */,
 				0F7C92DD26E57F75006AF012 /* pas_segregated_size_directory_creation_mode.h */,
 				0FC40A222451498500876DA0 /* pas_segregated_size_directory_inlines.h */,
-				0FC40AAB2451498E00876DA0 /* pas_segregated_size_directory.c */,
-				0FC40AF62451499400876DA0 /* pas_segregated_size_directory.h */,
+				0FC40A6E2451498A00876DA0 /* pas_segregated_view.c */,
+				0FC40AEF2451499300876DA0 /* pas_segregated_view.h */,
 				0F18F85725C347F300721C2A /* pas_segregated_view_allocator_inlines.h */,
 				0FC40A852451498C00876DA0 /* pas_segregated_view_kind.h */,
-				0FC40A6E2451498A00876DA0 /* pas_segregated_view.c */,
-				0FC40AEF2451499300876DA0 /* pas_segregated_view.h */,
+				0F5FE7DB25B6210D001859FC /* pas_shared_handle_or_page_boundary.h */,
 				0F5FE7CF25B6210C001859FC /* pas_shared_handle_or_page_boundary_inlines.h */,
-				0F5FE7DB25B6210D001859FC /* pas_shared_handle_or_page_boundary.h */,
 				0FCCD1422656018600171A1F /* pas_shared_page_directory_by_size.c */,
 				0FCCD1432656018600171A1F /* pas_shared_page_directory_by_size.h */,
 				0FC40A462451498700876DA0 /* pas_simple_free_heap_declarations.def */,
@@ -1870,8 +1874,8 @@
 				2C11E8942728DE27002162D0 /* pas_simple_type.c */,
 				0FC40A262451498500876DA0 /* pas_simple_type.h */,
 				2C91E551271CE47A00D67FF9 /* pas_size_lookup_mode.h */,
+				0FC40A922451498D00876DA0 /* pas_slow_path_mode.h */,
 				0FC40A612451498900876DA0 /* pas_slow_path_mode_prefix.h */,
-				0FC40A922451498D00876DA0 /* pas_slow_path_mode.h */,
 				0FC40AD52451499100876DA0 /* pas_small_large_map_entry.h */,
 				0FC40AEB2451499300876DA0 /* pas_snprintf.h */,
 				0FC40A1E2451498400876DA0 /* pas_status_reporter.c */,
@@ -1880,44 +1884,46 @@
 				0FC40AB92451498F00876DA0 /* pas_stream.h */,
 				0FC40A952451498D00876DA0 /* pas_string_stream.c */,
 				0FC40A3F2451498700876DA0 /* pas_string_stream.h */,
-				0F7C92D826E57F75006AF012 /* pas_thread_local_cache_layout_node_kind.h */,
+				0FC40A7C2451498B00876DA0 /* pas_thread_local_cache.c */,
+				0FC40AC72451499000876DA0 /* pas_thread_local_cache.h */,
+				0FC40A622451498900876DA0 /* pas_thread_local_cache_layout.c */,
+				0FC40A822451498B00876DA0 /* pas_thread_local_cache_layout.h */,
 				0F8E83272492EAF30046D7F8 /* pas_thread_local_cache_layout_node.c */,
 				0F8E83282492EAF30046D7F8 /* pas_thread_local_cache_layout_node.h */,
-				0FC40A622451498900876DA0 /* pas_thread_local_cache_layout.c */,
-				0FC40A822451498B00876DA0 /* pas_thread_local_cache_layout.h */,
+				0F7C92D826E57F75006AF012 /* pas_thread_local_cache_layout_node_kind.h */,
 				0FC40AA22451498E00876DA0 /* pas_thread_local_cache_node.c */,
 				0FC40AA72451498E00876DA0 /* pas_thread_local_cache_node.h */,
-				0FC40A7C2451498B00876DA0 /* pas_thread_local_cache.c */,
-				0FC40AC72451499000876DA0 /* pas_thread_local_cache.h */,
+				E35B7BC927ADB44E00C3498F /* pas_thread_suspend_lock.c */,
+				E35B7BC827ADB44E00C3498F /* pas_thread_suspend_lock.h */,
 				0FC40A782451498B00876DA0 /* pas_tiny_large_map_entry.h */,
 				0FC40AC52451499000876DA0 /* pas_tree_direction.h */,
 				0F8A801C25CF938A00790B4A /* pas_tri_state.h */,
+				0FC40A652451498900876DA0 /* pas_try_allocate.h */,
 				0FC40A522451498800876DA0 /* pas_try_allocate_array.h */,
 				0FC40A392451498600876DA0 /* pas_try_allocate_common.h */,
 				0F752D9127066FCB00ADF74D /* pas_try_allocate_intrinsic.h */,
 				0FC40A2B2451498500876DA0 /* pas_try_allocate_primitive.h */,
-				0FC40A652451498900876DA0 /* pas_try_allocate.h */,
 				0FC40A302451498600876DA0 /* pas_try_reallocate.h */,
 				0F5193F4266C42BF00483A2C /* pas_try_shrink.h */,
+				0FC40A312451498600876DA0 /* pas_utility_heap.c */,
+				0FC40AD02451499100876DA0 /* pas_utility_heap.h */,
 				0FC40A2C2451498500876DA0 /* pas_utility_heap_config.c */,
 				0FC40A9D2451498D00876DA0 /* pas_utility_heap_config.h */,
 				0FC40A1C2451498400876DA0 /* pas_utility_heap_support.h */,
-				0FC40A312451498600876DA0 /* pas_utility_heap.c */,
-				0FC40AD02451499100876DA0 /* pas_utility_heap.h */,
-				0FC40A5C2451498900876DA0 /* pas_utils_prefix.h */,
 				0FC40AE72451499300876DA0 /* pas_utils.c */,
 				0FC40AD32451499100876DA0 /* pas_utils.h */,
+				0FC40A5C2451498900876DA0 /* pas_utils_prefix.h */,
 				0F87008725AF9462000E1ABF /* pas_versioned_field.c */,
 				0FC40A2D2451498600876DA0 /* pas_versioned_field.h */,
-				0FC40AE02451499200876DA0 /* pas_virtual_range_min_heap.h */,
 				0FC40ABE2451499000876DA0 /* pas_virtual_range.c */,
 				0FC40AED2451499300876DA0 /* pas_virtual_range.h */,
+				0FC40AE02451499200876DA0 /* pas_virtual_range_min_heap.h */,
 				0FC40AEA2451499300876DA0 /* pas_zero_mode.h */,
+				0F8700CE25B0CB03000E1ABF /* thingy_heap.c */,
+				0F8700CA25B0CB02000E1ABF /* thingy_heap.h */,
 				0F8700CD25B0CB02000E1ABF /* thingy_heap_config.c */,
 				0F8700CC25B0CB02000E1ABF /* thingy_heap_config.h */,
 				0F8700CB25B0CB02000E1ABF /* thingy_heap_prefix.h */,
-				0F8700CE25B0CB03000E1ABF /* thingy_heap.c */,
-				0F8700CA25B0CB02000E1ABF /* thingy_heap.h */,
 			);
 			name = libpas;
 			sourceTree = "<group>";
@@ -2191,7 +2197,6 @@
 				0F7EB82D1F9541B000F1ABCB /* IsoTLSEntry.h in Headers */,
 				0F7EB8351F9541B000F1ABCB /* IsoTLSEntryInlines.h in Headers */,
 				0F7EB8461F9541B000F1ABCB /* IsoTLSInlines.h in Headers */,
-				2C971D04278E798700C9E129 /* pas_lenient_compact_ptr_inlines.h in Headers */,
 				0F7EB8401F9541B000F1ABCB /* IsoTLSLayout.h in Headers */,
 				0F5193EF266C42AD00483A2C /* jit_heap.h in Headers */,
 				0F5193EE266C42AD00483A2C /* jit_heap_config.h in Headers */,
@@ -2199,7 +2204,6 @@
 				144C07F51C7B70260051BB6A /* LargeMap.h in Headers */,
 				14C8992D1CC578330027A057 /* LargeRange.h in Headers */,
 				140FA00519CE4B6800FFD3C8 /* LineMetadata.h in Headers */,
-				2C971D06278E798700C9E129 /* pas_lenient_compact_unsigned_ptr.h in Headers */,
 				141D9B001C8E51C0000ABBA0 /* List.h in Headers */,
 				4426E2811C838EE0008EB042 /* Logging.h in Headers */,
 				14C8992B1CC485E70027A057 /* Map.h in Headers */,
@@ -2223,7 +2227,6 @@
 				0FC409D72451496400876DA0 /* pas_allocation_config.h in Headers */,
 				0FC409CD2451496400876DA0 /* pas_allocation_kind.h in Headers */,
 				0FC40A142451496400876DA0 /* pas_allocation_result.h in Headers */,
-				2CE2AE642769928300D02BBC /* pas_probabilistic_guard_malloc_allocator.h in Headers */,
 				0FC40A002451496400876DA0 /* pas_allocator_counts.h in Headers */,
 				0F75498224869740002A4C7D /* pas_allocator_index.h in Headers */,
 				0FC409E32451496400876DA0 /* pas_allocator_scavenge_action.h in Headers */,
@@ -2234,9 +2237,7 @@
 				0F87FFE225AF897C000E1ABF /* pas_basic_heap_config_root_data.h in Headers */,
 				0FC409FC2451496400876DA0 /* pas_basic_heap_page_caches.h in Headers */,
 				0FC409D42451496400876DA0 /* pas_basic_heap_runtime_config.h in Headers */,
-				2CE2AE5D2769928300D02BBC /* pas_compact_tagged_void_ptr.h in Headers */,
 				0F87000225AF897C000E1ABF /* pas_biasing_directory_kind.h in Headers */,
-				2CE2AE3227596DEB00D02BBC /* pas_get_page_base_and_kind_for_small_other_in_fast_megapage.h in Headers */,
 				0FC40A0B2451496400876DA0 /* pas_bitfield_vector.h in Headers */,
 				0F87000C25AF897D000E1ABF /* pas_bitfit_allocation_result.h in Headers */,
 				0F87FFE525AF897C000E1ABF /* pas_bitfit_allocator.h in Headers */,
@@ -2291,7 +2292,6 @@
 				0FC409E72451496400876DA0 /* pas_compact_cartesian_tree_node_ptr.h in Headers */,
 				2C48134327406A3E006CAB55 /* pas_compact_expendable_memory.h in Headers */,
 				0FC40A022451496400876DA0 /* pas_compact_heap_ptr.h in Headers */,
-				2CE2AE2E27596DEB00D02BBC /* pas_page_base_and_kind.h in Headers */,
 				0FC409D22451496400876DA0 /* pas_compact_heap_reservation.h in Headers */,
 				0FABDDD7248AB09200A840B3 /* pas_compact_large_utility_free_heap.h in Headers */,
 				0F5FE7ED25B6210D001859FC /* pas_compact_page_granule_use_count_ptr.h in Headers */,
@@ -2307,6 +2307,7 @@
 				0F5FE7EE25B6210D001859FC /* pas_compact_tagged_page_granule_use_count_ptr.h in Headers */,
 				0FC409C72451496400876DA0 /* pas_compact_tagged_ptr.h in Headers */,
 				0FC409F52451496400876DA0 /* pas_compact_tagged_unsigned_ptr.h in Headers */,
+				2CE2AE5D2769928300D02BBC /* pas_compact_tagged_void_ptr.h in Headers */,
 				0FC409F02451496400876DA0 /* pas_compact_unsigned_ptr.h in Headers */,
 				0FC40A092451496400876DA0 /* pas_compute_summary_object_callbacks.h in Headers */,
 				0FC40A0E2451496400876DA0 /* pas_config.h in Headers */,
@@ -2326,7 +2327,6 @@
 				0FC409EA2451496400876DA0 /* pas_ensure_heap_forced_into_reserved_memory.h in Headers */,
 				0FC409E92451496400876DA0 /* pas_ensure_heap_with_page_caches.h in Headers */,
 				0F87002C25AF89C9000E1ABF /* pas_enumerable_page_malloc.h in Headers */,
-				2C971D05278E798700C9E129 /* pas_lenient_compact_ptr.h in Headers */,
 				0F87002E25AF89C9000E1ABF /* pas_enumerable_range_list.h in Headers */,
 				0F87FFEC25AF897C000E1ABF /* pas_enumerate_bitfit_heaps.h in Headers */,
 				0F87000A25AF897C000E1ABF /* pas_enumerate_initially_unaccounted_pages.h in Headers */,
@@ -2361,6 +2361,7 @@
 				0FC40BBC2451499400876DA0 /* pas_get_heap.h in Headers */,
 				0F87003225AF89C9000E1ABF /* pas_get_object_kind.h in Headers */,
 				0F87003525AF89C9000E1ABF /* pas_get_page_base.h in Headers */,
+				2CE2AE3227596DEB00D02BBC /* pas_get_page_base_and_kind_for_small_other_in_fast_megapage.h in Headers */,
 				0FC40B4F2451499400876DA0 /* pas_has_object.h in Headers */,
 				0FC40B262451499400876DA0 /* pas_hashtable.h in Headers */,
 				0FC40B3D2451499400876DA0 /* pas_heap.h in Headers */,
@@ -2382,7 +2383,6 @@
 				0FC40BB12451499400876DA0 /* pas_heap_summary.h in Headers */,
 				0FC40B0D2451499400876DA0 /* pas_heap_table.h in Headers */,
 				0FC40B2C2451499400876DA0 /* pas_heap_table_state.h in Headers */,
-				2CE2AE3027596DEB00D02BBC /* pas_segregated_page_config_kind_and_role.h in Headers */,
 				0FC40B7A2451499400876DA0 /* pas_immortal_heap.h in Headers */,
 				0FC40B6F2451499400876DA0 /* pas_immutable_vector.h in Headers */,
 				0F516EE52456184F004E2B8D /* pas_internal_config.h in Headers */,
@@ -2403,6 +2403,9 @@
 				0FC40AFC2451499400876DA0 /* pas_large_sharing_pool.h in Headers */,
 				0FC40B982451499400876DA0 /* pas_large_sharing_pool_epoch_update_mode.h in Headers */,
 				0FC40BCC2451499400876DA0 /* pas_large_utility_free_heap.h in Headers */,
+				2C971D05278E798700C9E129 /* pas_lenient_compact_ptr.h in Headers */,
+				2C971D04278E798700C9E129 /* pas_lenient_compact_ptr_inlines.h in Headers */,
+				2C971D06278E798700C9E129 /* pas_lenient_compact_unsigned_ptr.h in Headers */,
 				0F8A813325F83E2500790B4A /* pas_line_word_config.h in Headers */,
 				0FC40B592451499400876DA0 /* pas_list_direction.h in Headers */,
 				0FC40B282451499400876DA0 /* pas_local_allocator.h in Headers */,
@@ -2424,6 +2427,7 @@
 				0FC40BAD2451499400876DA0 /* pas_mutation_count.h in Headers */,
 				0F87006B25AF8A1B000E1ABF /* pas_object_kind.h in Headers */,
 				0F87007A25AF8A1B000E1ABF /* pas_page_base.h in Headers */,
+				2CE2AE2E27596DEB00D02BBC /* pas_page_base_and_kind.h in Headers */,
 				0F87007D25AF8A1B000E1ABF /* pas_page_base_config.h in Headers */,
 				0F87007B25AF8A1B000E1ABF /* pas_page_base_config_inlines.h in Headers */,
 				0F87006A25AF8A1B000E1ABF /* pas_page_base_config_utils.h in Headers */,
@@ -2446,6 +2450,7 @@
 				0FC40B142451499400876DA0 /* pas_physical_memory_transaction.h in Headers */,
 				E38A9E3C27426514000BBD49 /* pas_platform.h in Headers */,
 				0FC40BD32451499400876DA0 /* pas_primitive_heap_ref.h in Headers */,
+				2CE2AE642769928300D02BBC /* pas_probabilistic_guard_malloc_allocator.h in Headers */,
 				0F87007425AF8A1B000E1ABF /* pas_promote_intrinsic_heap.h in Headers */,
 				0F87006325AF8A1B000E1ABF /* pas_ptr_hash_map.h in Headers */,
 				0FC40B9E2451499400876DA0 /* pas_ptr_hash_set.h in Headers */,
@@ -2466,6 +2471,7 @@
 				0F87007625AF8A1B000E1ABF /* pas_root.h in Headers */,
 				0FC40B352451499400876DA0 /* pas_scavenger.h in Headers */,
 				0FC40B4D2451499400876DA0 /* pas_segmented_vector.h in Headers */,
+				2CE2AE3327596DEB00D02BBC /* pas_segregated_deallocation_logging_mode.h in Headers */,
 				0F7C92E526E57F75006AF012 /* pas_segregated_deallocation_mode.h in Headers */,
 				0FC40B4C2451499400876DA0 /* pas_segregated_directory.h in Headers */,
 				0FC40B6B2451499400876DA0 /* pas_segregated_directory_bit_reference.h in Headers */,
@@ -2483,11 +2489,13 @@
 				0FC40BB52451499400876DA0 /* pas_segregated_page_config_inlines.h in Headers */,
 				0FC40BD6245149AE00876DA0 /* pas_segregated_page_config_kind.def in Headers */,
 				0FC40B382451499400876DA0 /* pas_segregated_page_config_kind.h in Headers */,
+				2CE2AE3027596DEB00D02BBC /* pas_segregated_page_config_kind_and_role.h in Headers */,
 				0FC40B722451499400876DA0 /* pas_segregated_page_config_utils.h in Headers */,
 				0FC40B332451499400876DA0 /* pas_segregated_page_config_utils_inlines.h in Headers */,
 				0F5FE7DE25B6210D001859FC /* pas_segregated_page_config_variant.h in Headers */,
 				0FC40B872451499400876DA0 /* pas_segregated_page_emptiness_kind.h in Headers */,
 				0FC40BB82451499400876DA0 /* pas_segregated_page_inlines.h in Headers */,
+				2CE2AE2D27596DEB00D02BBC /* pas_segregated_page_role.h in Headers */,
 				0FC40B002451499400876DA0 /* pas_segregated_partial_view.h in Headers */,
 				0FC40BB92451499400876DA0 /* pas_segregated_partial_view_inlines.h in Headers */,
 				0FC40B472451499400876DA0 /* pas_segregated_shared_handle.h in Headers */,
@@ -2496,7 +2504,6 @@
 				0FC40B112451499400876DA0 /* pas_segregated_shared_view.h in Headers */,
 				0FC40B642451499400876DA0 /* pas_segregated_shared_view_inlines.h in Headers */,
 				0FC40BD12451499400876DA0 /* pas_segregated_size_directory.h in Headers */,
-				2CE2AE3327596DEB00D02BBC /* pas_segregated_deallocation_logging_mode.h in Headers */,
 				0F7C92ED26E57F75006AF012 /* pas_segregated_size_directory_creation_mode.h in Headers */,
 				0FC40B012451499400876DA0 /* pas_segregated_size_directory_inlines.h in Headers */,
 				0FC40BCA2451499400876DA0 /* pas_segregated_view.h in Headers */,
@@ -2523,6 +2530,7 @@
 				0F8E83302492EAF30046D7F8 /* pas_thread_local_cache_layout_node.h in Headers */,
 				0F7C92E826E57F75006AF012 /* pas_thread_local_cache_layout_node_kind.h in Headers */,
 				0FC40B822451499400876DA0 /* pas_thread_local_cache_node.h in Headers */,
+				E35B7BCA27ADB44E00C3498F /* pas_thread_suspend_lock.h in Headers */,
 				0FC40B542451499400876DA0 /* pas_tiny_large_map_entry.h in Headers */,
 				0FC40BA02451499400876DA0 /* pas_tree_direction.h in Headers */,
 				0F8A801D25CF938A00790B4A /* pas_tri_state.h in Headers */,
@@ -2533,7 +2541,6 @@
 				0FC40B0A2451499400876DA0 /* pas_try_allocate_primitive.h in Headers */,
 				0FC40B0F2451499400876DA0 /* pas_try_reallocate.h in Headers */,
 				0F5193F5266C42BF00483A2C /* pas_try_shrink.h in Headers */,
-				2CE2AE2D27596DEB00D02BBC /* pas_segregated_page_role.h in Headers */,
 				0FC40BAB2451499400876DA0 /* pas_utility_heap.h in Headers */,
 				0FC40B782451499400876DA0 /* pas_utility_heap_config.h in Headers */,
 				0FC40AFB2451499400876DA0 /* pas_utility_heap_support.h in Headers */,
@@ -2658,7 +2665,6 @@
 				6599C5CC1EC3F15900A2F7BB /* AvailableMemory.cpp in Sources */,
 				0F5167741FAD685C008236A8 /* bmalloc.cpp in Sources */,
 				0F8A813625F83E2500790B4A /* bmalloc_heap.c in Sources */,
-				2CE2AE632769928300D02BBC /* pas_probabilistic_guard_malloc_allocator.c in Sources */,
 				0F8A812C25F83E2500790B4A /* bmalloc_heap_config.c in Sources */,
 				2C11E8962728DE27002162D0 /* bmalloc_type.c in Sources */,
 				14F271C418EA397B008C152F /* Cache.cpp in Sources */,
@@ -2680,7 +2686,6 @@
 				0FCA1D692454E64500A79A26 /* IsoHeap.cpp in Sources */,
 				0F7EB83B1F9541B000F1ABCB /* IsoHeapImpl.cpp in Sources */,
 				0FCA1D6A2454E64500A79A26 /* IsoMallocFallback.cpp in Sources */,
-				2CE2AE3127596DEB00D02BBC /* pas_segregated_page_config_kind_and_role.c in Sources */,
 				0F5549EF1FB54704007FF75A /* IsoPage.cpp in Sources */,
 				E3FBB5A1225EADB000DB6FBD /* IsoSharedHeap.cpp in Sources */,
 				E3F24404225D2C7600A0E0C3 /* IsoSharedPage.cpp in Sources */,
@@ -2697,7 +2702,6 @@
 				14F271C818EA3990008C152F /* ObjectType.cpp in Sources */,
 				E378A9DF246B68720029C2BB /* ObjectTypeTable.cpp in Sources */,
 				0F18F84725C3467700721C2A /* pagesize64k_heap.c in Sources */,
-				2C971D07278E798700C9E129 /* pas_lenient_compact_unsigned_ptr.c in Sources */,
 				0F18F84925C3467700721C2A /* pagesize64k_heap_config.c in Sources */,
 				0FC4095D2451494400876DA0 /* pas_alignment.c in Sources */,
 				0FC409642451494400876DA0 /* pas_all_heaps.c in Sources */,
@@ -2768,12 +2772,12 @@
 				0FC40BCF2451499400876DA0 /* pas_large_map.c in Sources */,
 				0FC40B292451499400876DA0 /* pas_large_sharing_pool.c in Sources */,
 				0FC40B7E2451499400876DA0 /* pas_large_utility_free_heap.c in Sources */,
+				2C971D07278E798700C9E129 /* pas_lenient_compact_unsigned_ptr.c in Sources */,
 				0FC40B072451499400876DA0 /* pas_local_allocator.c in Sources */,
 				0F7C92EA26E57F75006AF012 /* pas_local_allocator_scavenger_data.c in Sources */,
 				0F7C92E626E57F75006AF012 /* pas_local_view_cache.c in Sources */,
 				0F7C92F126E57F75006AF012 /* pas_local_view_cache_node.c in Sources */,
 				0FC40BDA245243A400876DA0 /* pas_lock.c in Sources */,
-				2CE2AE2F27596DEB00D02BBC /* pas_page_base_config.c in Sources */,
 				0FC40B342451499400876DA0 /* pas_lock_free_read_ptr_ptr_hashtable.c in Sources */,
 				0FC40BB22451499400876DA0 /* pas_log.c in Sources */,
 				0F87006825AF8A1B000E1ABF /* pas_medium_megapage_cache.c in Sources */,
@@ -2780,6 +2784,7 @@
 				0FC40B5D2451499400876DA0 /* pas_megapage_cache.c in Sources */,
 				0FC40B6A2451499400876DA0 /* pas_monotonic_time.c in Sources */,
 				0F87006F25AF8A1B000E1ABF /* pas_page_base.c in Sources */,
+				2CE2AE2F27596DEB00D02BBC /* pas_page_base_config.c in Sources */,
 				0F87007E25AF8A1B000E1ABF /* pas_page_header_table.c in Sources */,
 				0FC40B652451499400876DA0 /* pas_page_malloc.c in Sources */,
 				0FC40B122451499400876DA0 /* pas_page_sharing_participant.c in Sources */,
@@ -2787,6 +2792,7 @@
 				0F87006925AF8A1B000E1ABF /* pas_payload_reservation_page_list.c in Sources */,
 				0FC40B492451499400876DA0 /* pas_physical_memory_transaction.c in Sources */,
 				0FC40B222451499400876DA0 /* pas_primitive_heap_ref.c in Sources */,
+				2CE2AE632769928300D02BBC /* pas_probabilistic_guard_malloc_allocator.c in Sources */,
 				0F87007C25AF8A1B000E1ABF /* pas_ptr_worklist.c in Sources */,
 				0FC40B7C2451499400876DA0 /* pas_race_test_hooks.c in Sources */,
 				0FC40AFE2451499400876DA0 /* pas_random.c in Sources */,
@@ -2801,6 +2807,7 @@
 				0FC40BBA2451499400876DA0 /* pas_segregated_page.c in Sources */,
 				0FC40B202451499400876DA0 /* pas_segregated_page_config.c in Sources */,
 				0FC40BC02451499400876DA0 /* pas_segregated_page_config_kind.c in Sources */,
+				2CE2AE3127596DEB00D02BBC /* pas_segregated_page_config_kind_and_role.c in Sources */,
 				0FC40B1B2451499400876DA0 /* pas_segregated_partial_view.c in Sources */,
 				0FC40BCE2451499400876DA0 /* pas_segregated_shared_handle.c in Sources */,
 				0FC40B312451499400876DA0 /* pas_segregated_shared_page_directory.c in Sources */,
@@ -2818,6 +2825,7 @@
 				0FC40B402451499400876DA0 /* pas_thread_local_cache_layout.c in Sources */,
 				0F8E832F2492EAF30046D7F8 /* pas_thread_local_cache_layout_node.c in Sources */,
 				0FC40B7D2451499400876DA0 /* pas_thread_local_cache_node.c in Sources */,
+				E35B7BCB27ADB44E00C3498F /* pas_thread_suspend_lock.c in Sources */,
 				0FC40B102451499400876DA0 /* pas_utility_heap.c in Sources */,
 				0FC40B0B2451499400876DA0 /* pas_utility_heap_config.c in Sources */,
 				0FC40BC22451499400876DA0 /* pas_utils.c in Sources */,

Modified: branches/safari-613-branch/Source/bmalloc/libpas/src/libpas/pas_scavenger.c (289556 => 289557)


--- branches/safari-613-branch/Source/bmalloc/libpas/src/libpas/pas_scavenger.c	2022-02-10 19:12:19 UTC (rev 289556)
+++ branches/safari-613-branch/Source/bmalloc/libpas/src/libpas/pas_scavenger.c	2022-02-10 19:12:24 UTC (rev 289557)
@@ -207,8 +207,7 @@
         
         should_go_again |=
             pas_thread_local_cache_for_all(pas_allocator_scavenge_request_stop_action,
-                                           pas_deallocator_scavenge_flush_log_if_clean_action,
-                                           pas_lock_is_not_held);
+                                           pas_deallocator_scavenge_flush_log_if_clean_action);
 
         should_go_again |= handle_expendable_memory(pas_expendable_memory_scavenge_periodic);
 
@@ -479,8 +478,7 @@
     pas_scavenger_clear_all_caches_except_remote_tlcs();
     
     pas_thread_local_cache_for_all(pas_allocator_scavenge_force_stop_action,
-                                   pas_deallocator_scavenge_flush_log_action,
-                                   pas_lock_is_not_held);
+                                   pas_deallocator_scavenge_flush_log_action);
 }
 
 void pas_scavenger_decommit_expendable_memory(void)

Modified: branches/safari-613-branch/Source/bmalloc/libpas/src/libpas/pas_thread_local_cache.c (289556 => 289557)


--- branches/safari-613-branch/Source/bmalloc/libpas/src/libpas/pas_thread_local_cache.c	2022-02-10 19:12:19 UTC (rev 289556)
+++ branches/safari-613-branch/Source/bmalloc/libpas/src/libpas/pas_thread_local_cache.c	2022-02-10 19:12:24 UTC (rev 289557)
@@ -40,6 +40,7 @@
 #include "pas_segregated_page.h"
 #include "pas_thread_local_cache_layout.h"
 #include "pas_thread_local_cache_node.h"
+#include "pas_thread_suspend_lock.h"
 #include <unistd.h>
 #if PAS_OS(DARWIN)
 #include <mach/thread_act.h>
@@ -630,8 +631,7 @@
 #endif
 
 bool pas_thread_local_cache_for_all(pas_allocator_scavenge_action allocator_action,
-                                    pas_deallocator_scavenge_action deallocator_action,
-                                    pas_lock_hold_mode heap_lock_hold_mode)
+                                    pas_deallocator_scavenge_action deallocator_action)
 {
     static const bool verbose = false;
     
@@ -642,6 +642,10 @@
        be returned if this was called again. */
     result = false;
 
+    /* The thread suspend lock ensures that thread suspention can be done only from one thread at a time.
+       This avoids dead-lock where multiple threads suspend / resume each other. */
+    pas_thread_suspend_lock_lock();
+
     /* The heap lock protects two things:
        
        - The iteration over thread local caches. Otherwise we wouldn't be able to ask if a cache
@@ -655,7 +659,7 @@
          B) are the thread that owns the cache and you hold the heap lock.
          
          C) you hold the heap lock and you have checked that the is_in_use bit is not set. */
-    pas_heap_lock_lock_conditionally(heap_lock_hold_mode);
+    pas_heap_lock_lock();
     
     for (node = pas_thread_local_cache_node_first; node; node = node->next) {
         pas_thread_local_cache* cache;
@@ -788,7 +792,8 @@
         pas_lock_unlock(&node->log_flush_lock);
     }
     
-    pas_heap_lock_unlock_conditionally(heap_lock_hold_mode);
+    pas_heap_lock_unlock();
+    pas_thread_suspend_lock_unlock();
 
     return result;
 }

Modified: branches/safari-613-branch/Source/bmalloc/libpas/src/libpas/pas_thread_local_cache.h (289556 => 289557)


--- branches/safari-613-branch/Source/bmalloc/libpas/src/libpas/pas_thread_local_cache.h	2022-02-10 19:12:19 UTC (rev 289556)
+++ branches/safari-613-branch/Source/bmalloc/libpas/src/libpas/pas_thread_local_cache.h	2022-02-10 19:12:24 UTC (rev 289557)
@@ -331,8 +331,7 @@
 /* Returns true if it's possible that we'll be able to return more memory if this was called
    again. */
 PAS_API bool pas_thread_local_cache_for_all(pas_allocator_scavenge_action allocator_action,
-                                            pas_deallocator_scavenge_action deallocator_action,
-                                            pas_lock_hold_mode heap_lock_hold_mode);
+                                            pas_deallocator_scavenge_action deallocator_action);
 
 PAS_API PAS_NEVER_INLINE void pas_thread_local_cache_append_deallocation_slow(
     pas_thread_local_cache* thread_local_cache,

Copied: branches/safari-613-branch/Source/bmalloc/libpas/src/libpas/pas_thread_suspend_lock.c (from rev 289556, branches/safari-613-branch/Source/WTF/wtf/ThreadMessage.cpp) (0 => 289557)


--- branches/safari-613-branch/Source/bmalloc/libpas/src/libpas/pas_thread_suspend_lock.c	                        (rev 0)
+++ branches/safari-613-branch/Source/bmalloc/libpas/src/libpas/pas_thread_suspend_lock.c	2022-02-10 19:12:24 UTC (rev 289557)
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2022 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "pas_config.h"
+
+#if LIBPAS_ENABLED
+
+#include "pas_thread_suspend_lock.h"
+
+PAS_DEFINE_LOCK(pas_thread_suspend);
+
+#endif /* LIBPAS_ENABLED */

Copied: branches/safari-613-branch/Source/bmalloc/libpas/src/libpas/pas_thread_suspend_lock.h (from rev 289556, branches/safari-613-branch/Source/WTF/wtf/ThreadMessage.cpp) (0 => 289557)


--- branches/safari-613-branch/Source/bmalloc/libpas/src/libpas/pas_thread_suspend_lock.h	                        (rev 0)
+++ branches/safari-613-branch/Source/bmalloc/libpas/src/libpas/pas_thread_suspend_lock.h	2022-02-10 19:12:24 UTC (rev 289557)
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2022 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef PAS_THREAD_SUSPEND_LOCK_H
+#define PAS_THREAD_SUSPEND_LOCK_H
+
+#include "pas_lock.h"
+
+PAS_BEGIN_EXTERN_C;
+
+PAS_DECLARE_LOCK(pas_thread_suspend);
+
+PAS_END_EXTERN_C;
+
+#endif /* PAS_THREAD_SUSPEND_LOCK_H */

Modified: branches/safari-613-branch/Tools/TestWebKitAPI/Tests/WTF/ThreadMessages.cpp (289556 => 289557)


--- branches/safari-613-branch/Tools/TestWebKitAPI/Tests/WTF/ThreadMessages.cpp	2022-02-10 19:12:19 UTC (rev 289556)
+++ branches/safari-613-branch/Tools/TestWebKitAPI/Tests/WTF/ThreadMessages.cpp	2022-02-10 19:12:24 UTC (rev 289557)
@@ -47,10 +47,14 @@
     for (unsigned senderID = 0; senderID < numSenders; ++senderID) {
         senderThreads[senderID] = Thread::create("ThreadMessage sender", [senderID, numMessages, receiverThread, &messagesRun, &handlersRun] () {
             for (unsigned i = 0; i < numMessages; ++i) {
-                auto result = sendMessage(*receiverThread.get(), [senderID, &handlersRun] (PlatformRegisters&) {
-                    handlersRun[senderID]++;
-                });
-                EXPECT_TRUE(result == WTF::MessageStatus::MessageRan);
+                WTF::MessageStatus status;
+                {
+                    ThreadSuspendLocker locker;
+                    status = sendMessage(locker, *receiverThread.get(), [senderID, &handlersRun] (PlatformRegisters&) {
+                        handlersRun[senderID]++;
+                    });
+                }
+                EXPECT_TRUE(status == WTF::MessageStatus::MessageRan);
                 messagesRun[senderID]++;
             }
         });
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to