From 2df2855e168177a4531107554a28502f7299dd34 Mon Sep 17 00:00:00 2001 From: vsadov <8218165+VSadov@users.noreply.github.com> Date: Tue, 10 Dec 2024 20:12:05 -0800 Subject: [PATCH] OsDetachThread could be void --- src/coreclr/vm/ceemain.cpp | 5 ++--- src/coreclr/vm/ceemain.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/coreclr/vm/ceemain.cpp b/src/coreclr/vm/ceemain.cpp index f3a8796aa12f36..9f9ffc56530b0f 100644 --- a/src/coreclr/vm/ceemain.cpp +++ b/src/coreclr/vm/ceemain.cpp @@ -1796,7 +1796,7 @@ static void OsAttachThread(void* thread) // thread - thread to detach // Return: // true if the thread was detached, false if there was no attached thread -bool OsDetachThread(void* thread) +void OsDetachThread(void* thread) { ASSERT(g_flsIndex != FLS_OUT_OF_INDEXES); void* threadFromCurrentFiber = FlsGetValue(g_flsIndex); @@ -1805,7 +1805,7 @@ bool OsDetachThread(void* thread) { // we've seen this thread, but not this fiber. It must be a "foreign" fiber that was // borrowing this thread. - return false; + return; } if (threadFromCurrentFiber != thread) @@ -1814,7 +1814,6 @@ bool OsDetachThread(void* thread) } FlsSetValue(g_flsIndex, NULL); - return true; } void EnsureTlsDestructionMonitor() diff --git a/src/coreclr/vm/ceemain.h b/src/coreclr/vm/ceemain.h index 69ba92d692d6d2..120082d30572ca 100644 --- a/src/coreclr/vm/ceemain.h +++ b/src/coreclr/vm/ceemain.h @@ -48,7 +48,7 @@ void ThreadDetaching(); void EnsureTlsDestructionMonitor(); #ifdef TARGET_WINDOWS void InitFlsSlot(); -bool OsDetachThread(void* thread); +void OsDetachThread(void* thread); #endif void SetLatchedExitCode (INT32 code);