Skip to content

Commit

Permalink
OsDetachThread could be void
Browse files Browse the repository at this point in the history
  • Loading branch information
VSadov committed Dec 11, 2024
1 parent dfcaf7c commit 2df2855
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/coreclr/vm/ceemain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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)
Expand All @@ -1814,7 +1814,6 @@ bool OsDetachThread(void* thread)
}

FlsSetValue(g_flsIndex, NULL);
return true;
}

void EnsureTlsDestructionMonitor()
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/vm/ceemain.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2df2855

Please sign in to comment.