Skip to content

Commit

Permalink
Enable activation injection on unix (dotnet#95555)
Browse files Browse the repository at this point in the history
  • Loading branch information
eterekhin authored and tmds committed Jan 23, 2024
1 parent 9b92c2f commit d823244
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/coreclr/vm/threadsuspend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4287,7 +4287,7 @@ bool Thread::SysStartSuspendForDebug(AppDomain *pAppDomain)
// region, SysSweepThreadsForDebug would similarly identify the thread as synced
// after it leaves the forbid region.

#if defined(FEATURE_THREAD_ACTIVATION) && defined(TARGET_WINDOWS)
#if defined(FEATURE_THREAD_ACTIVATION)
// Inject an activation that will interrupt the thread and try to bring it to a safe point
thread->InjectActivation(Thread::ActivationReason::SuspendForDebugger);
#endif // FEATURE_THREAD_ACTIVATION && TARGET_WINDOWS
Expand Down Expand Up @@ -4424,7 +4424,7 @@ bool Thread::SysSweepThreadsForDebug(bool forceSync)
goto Label_MarkThreadAsSynced;
}

#if defined(FEATURE_THREAD_ACTIVATION) && defined(TARGET_WINDOWS)
#if defined(FEATURE_THREAD_ACTIVATION)
// Inject an activation that will interrupt the thread and try to bring it to a safe point
thread->InjectActivation(Thread::ActivationReason::SuspendForDebugger);
#endif // FEATURE_THREAD_ACTIVATION && TARGET_WINDOWS
Expand Down Expand Up @@ -6040,7 +6040,7 @@ bool Thread::InjectActivation(ActivationReason reason)
_ASSERTE(success);
return true;
#elif defined(TARGET_UNIX)
_ASSERTE((reason == ActivationReason::SuspendForGC) || (reason == ActivationReason::ThreadAbort));
_ASSERTE((reason == ActivationReason::SuspendForGC) || (reason == ActivationReason::ThreadAbort) || (reason == ActivationReason::SuspendForDebugger));

static ConfigDWORD injectionEnabled;
if (injectionEnabled.val(CLRConfig::INTERNAL_ThreadSuspendInjection) == 0)
Expand Down

0 comments on commit d823244

Please sign in to comment.