From 6cf741b19ef758ea8ddf09e913b8c27823d9ead3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 28 Oct 2025 04:10:39 +0000 Subject: [PATCH 1/2] Initial plan From 06f44c74c97ba08583be90b2e33b9b3e48f9c357 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 28 Oct 2025 04:55:22 +0000 Subject: [PATCH 2/2] Remove unused PulseAllHelper method Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com> --- src/coreclr/vm/comsynchronizable.cpp | 29 ---------------------------- 1 file changed, 29 deletions(-) diff --git a/src/coreclr/vm/comsynchronizable.cpp b/src/coreclr/vm/comsynchronizable.cpp index 952e38989d8fbc..c4c414a7ebda72 100644 --- a/src/coreclr/vm/comsynchronizable.cpp +++ b/src/coreclr/vm/comsynchronizable.cpp @@ -137,32 +137,6 @@ static void KickOffThread_Worker(LPVOID ptr) CALL_MANAGED_METHOD_NORET(args); } -// Helper to avoid two EX_TRY/EX_CATCH blocks in one function -static void PulseAllHelper(Thread* pThread) -{ - CONTRACTL - { - GC_TRIGGERS; - DISABLED(NOTHROW); - MODE_COOPERATIVE; - } - CONTRACTL_END; - - EX_TRY - { - // GetExposedObject() will either throw, or we have a valid object. Note - // that we re-acquire it each time, since it may move during calls. - pThread->GetExposedObject()->EnterObjMonitor(); - pThread->GetExposedObject()->PulseAll(); - pThread->GetExposedObject()->LeaveObjMonitor(); - } - EX_CATCH - { - // just keep going... - } - EX_END_CATCH -} - // When an exposed thread is started by Win32, this is where it starts. static ULONG WINAPI KickOffThread(void* pass) { @@ -203,8 +177,6 @@ static ULONG WINAPI KickOffThread(void* pass) ManagedThreadBase::KickOff(KickOffThread_Worker, NULL); - PulseAllHelper(pThread); - GCX_PREEMP_NO_DTOR(); pThread->ClearThreadCPUGroupAffinity(); @@ -295,7 +267,6 @@ extern "C" void QCALLTYPE ThreadNative_Start(QCall::ThreadHandle thread, int thr { GCX_COOP(); - PulseAllHelper(pNewThread); pNewThread->HandleThreadStartupFailure(); }