diff options
Diffstat (limited to 'src/vm/threadsuspend.cpp')
-rw-r--r-- | src/vm/threadsuspend.cpp | 50 |
1 files changed, 2 insertions, 48 deletions
diff --git a/src/vm/threadsuspend.cpp b/src/vm/threadsuspend.cpp index 1fee3b760c..9760fe4293 100644 --- a/src/vm/threadsuspend.cpp +++ b/src/vm/threadsuspend.cpp @@ -1356,7 +1356,6 @@ Thread::UserAbort(ThreadAbortRequester requester, case eExitProcess: case eFastExitProcess: case eRudeExitProcess: - case eDisableRuntime: GetEEPolicy()->NotifyHostOnDefaultAction(operation,action); EEPolicy::HandleExitProcessFromEscalation(action, HOST_E_EXITPROCESS_THREADABORT); _ASSERTE (!"Should not reach here"); @@ -1986,7 +1985,6 @@ LPrepareRetry: case eExitProcess: case eFastExitProcess: case eRudeExitProcess: - case eDisableRuntime: GetEEPolicy()->NotifyHostOnTimeout(operation1, action1); EEPolicy::HandleExitProcessFromEscalation(action1, HOST_E_EXITPROCESS_TIMEOUT); _ASSERTE (!"Should not reach here"); @@ -2543,9 +2541,8 @@ void Thread::RareDisablePreemptiveGC() // Note IsGCInProgress is also true for say Pause (anywhere SuspendEE happens) and GCThread is the // thread that did the Pause. While in Pause if another thread attempts Rev/Pinvoke it should get inside the following and // block until resume - if (((GCHeapUtilities::IsGCInProgress() && (this != ThreadSuspend::GetSuspensionThread())) || - (m_State & (TS_UserSuspendPending | TS_DebugSuspendPending | TS_StackCrawlNeeded))) && - (!g_fSuspendOnShutdown || IsFinalizerThread() || IsShutdownSpecialThread())) + if ((GCHeapUtilities::IsGCInProgress() && (this != ThreadSuspend::GetSuspensionThread())) || + (m_State & (TS_UserSuspendPending | TS_DebugSuspendPending | TS_StackCrawlNeeded))) { if (!ThreadStore::HoldingThreadStore(this)) { @@ -2653,47 +2650,6 @@ void Thread::RareDisablePreemptiveGC() STRESS_LOG0(LF_SYNC, LL_INFO1000, "RareDisablePreemptiveGC: leaving\n"); } - // Block all threads except finalizer and shutdown thread during shutdown. - // If g_fSuspendFinalizerOnShutdown is set, block the finalizer too. - if ((g_fSuspendOnShutdown && !IsFinalizerThread() && !IsShutdownSpecialThread()) || - (g_fSuspendFinalizerOnShutdown && IsFinalizerThread())) - { - STRESS_LOG1(LF_SYNC, LL_INFO1000, "RareDisablePreemptiveGC: entering. Thread state = %x\n", m_State.Load()); - - EnablePreemptiveGC(); - - // Cannot use GCX_PREEMP_NO_DTOR here because we're inside of the thread - // PREEMP->COOP switch mechanism and GCX_PREEMP's assert's will fire. - // Instead we use BEGIN_GCX_ASSERT_PREEMP to inform Scan of the mode - // change here. - BEGIN_GCX_ASSERT_PREEMP; - -#ifdef PROFILING_SUPPORTED - // If profiler desires GC events, notify it that this thread is waiting until the GC is over - // Do not send suspend notifications for debugger suspensions - { - BEGIN_PIN_PROFILER(CORProfilerTrackSuspends()); - if (!(m_State & TS_DebugSuspendPending)) - { - g_profControlBlock.pProfInterface->RuntimeThreadSuspended((ThreadID)this); - } - END_PIN_PROFILER(); - } -#endif // PROFILING_SUPPORTED - - - - // The thread is blocked for shutdown. We do not concern for GC violation. - CONTRACT_VIOLATION(GCViolation); - - WaitForEndOfShutdown(); - - END_GCX_ASSERT_PREEMP; - - __SwitchToThread(INFINITE, CALLER_LIMITS_SPINNING); - _ASSERTE(!"Cannot reach here"); - } - Exit: ; END_PRESERVE_LAST_ERROR; } @@ -2740,7 +2696,6 @@ void Thread::HandleThreadAbortTimeout() case eExitProcess: case eFastExitProcess: case eRudeExitProcess: - case eDisableRuntime: GetEEPolicy()->NotifyHostOnTimeout(operation,action); EEPolicy::HandleExitProcessFromEscalation(action, HOST_E_EXITPROCESS_THREADABORT); _ASSERTE (!"Should not reach here"); @@ -2844,7 +2799,6 @@ void Thread::PreWorkForThreadAbort() case eExitProcess: case eFastExitProcess: case eRudeExitProcess: - case eDisableRuntime: { GetEEPolicy()->NotifyHostOnDefaultAction(OPR_ThreadRudeAbortInCriticalRegion,action); GetEEPolicy()->HandleExitProcessFromEscalation(action,HOST_E_EXITPROCESS_ADUNLOAD); |