diff options
author | Filip Navara <filip.navara@gmail.com> | 2019-01-24 18:25:33 +0100 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2019-01-24 09:25:33 -0800 |
commit | aa2221d9b1ea39cd6e92895be5e0c7d90072a581 (patch) | |
tree | 06a7e1dcae5f0e8a1935f7b85fdfc18d7cb6b70c | |
parent | 786d2e06023ee1dc96ed9cc062135b3e0aad4137 (diff) | |
download | coreclr-aa2221d9b1ea39cd6e92895be5e0c7d90072a581.tar.gz coreclr-aa2221d9b1ea39cd6e92895be5e0c7d90072a581.tar.bz2 coreclr-aa2221d9b1ea39cd6e92895be5e0c7d90072a581.zip |
Remove obsolete thread abortion flags. (#22185)
-rw-r--r-- | src/vm/appdomain.cpp | 2 | ||||
-rw-r--r-- | src/vm/eepolicy.h | 2 | ||||
-rw-r--r-- | src/vm/threads.h | 14 | ||||
-rw-r--r-- | src/vm/threadsuspend.cpp | 29 |
4 files changed, 3 insertions, 44 deletions
diff --git a/src/vm/appdomain.cpp b/src/vm/appdomain.cpp index c225c58a83..f7bedff69f 100644 --- a/src/vm/appdomain.cpp +++ b/src/vm/appdomain.cpp @@ -6834,7 +6834,7 @@ BOOL AppDomain::StopEEAndUnwindThreads(unsigned int retryCount, BOOL *pFMarkUnlo #if _DEBUG_ADUNLOAD printf("AppDomain::UnwindThreads %x stopping %x with first frame %8.8p\n", GetThread()->GetThreadId(), pThread->GetThreadId(), pFrame); #endif - pThread->SetAbortRequest(EEPolicy::TA_V1Compatible); + pThread->SetAbortRequest(EEPolicy::TA_Safe); } TESTHOOKCALL(UnwindingThreads(GetId().m_dwId)) ; } diff --git a/src/vm/eepolicy.h b/src/vm/eepolicy.h index 9ca09bb67b..5d6105fbc0 100644 --- a/src/vm/eepolicy.h +++ b/src/vm/eepolicy.h @@ -35,8 +35,6 @@ public: TA_None, // No Abort // Abort at a safe spot: not having any lock, not inside finally, not inside catch TA_Safe, - // Do we need this one? - TA_V1Compatible, // Do not run user finally, no attention to lock count TA_Rude }; diff --git a/src/vm/threads.h b/src/vm/threads.h index ba22725638..e728303df3 100644 --- a/src/vm/threads.h +++ b/src/vm/threads.h @@ -2670,7 +2670,6 @@ public: { TAR_Thread = 0x00000001, // Request by Thread TAR_FuncEval = 0x00000004, // Request by Func-Eval - TAR_StackOverflow = 0x00000008, // Request by StackOverflow. TAR_THREAD should be set at the same time. TAR_ALL = 0xFFFFFFFF, }; @@ -2682,33 +2681,20 @@ private: enum ThreadAbortInfo { TAI_ThreadAbort = 0x00000001, - TAI_ThreadV1Abort = 0x00000002, TAI_ThreadRudeAbort = 0x00000004, - TAI_ADUnloadAbort = 0x00000008, - TAI_ADUnloadV1Abort = 0x00000010, - TAI_ADUnloadRudeAbort = 0x00000020, TAI_FuncEvalAbort = 0x00000040, - TAI_FuncEvalV1Abort = 0x00000080, TAI_FuncEvalRudeAbort = 0x00000100, }; static const DWORD TAI_AnySafeAbort = (TAI_ThreadAbort | - TAI_ADUnloadAbort | TAI_FuncEvalAbort ); - static const DWORD TAI_AnyV1Abort = (TAI_ThreadV1Abort | - TAI_ADUnloadV1Abort | - TAI_FuncEvalV1Abort - ); - static const DWORD TAI_AnyRudeAbort = (TAI_ThreadRudeAbort | - TAI_ADUnloadRudeAbort | TAI_FuncEvalRudeAbort ); static const DWORD TAI_AnyFuncEvalAbort = (TAI_FuncEvalAbort | - TAI_FuncEvalV1Abort | TAI_FuncEvalRudeAbort ); diff --git a/src/vm/threadsuspend.cpp b/src/vm/threadsuspend.cpp index fcc9732a31..dc6ef9ae11 100644 --- a/src/vm/threadsuspend.cpp +++ b/src/vm/threadsuspend.cpp @@ -1176,10 +1176,6 @@ BOOL Thread::ReadyForAsyncException() STRESS_LOG0(LF_APPDOMAIN, LL_INFO10, "in Thread::ReadyForAbort RunningEHClause\n"); } - //if (m_AbortType == EEPolicy::TA_V1Compatible) { - // return TRUE; - //} - // If we are running finally, we can not abort for Safe Abort. return !TAContext.fWithinEHClause; } @@ -2074,10 +2070,6 @@ void Thread::ThreadAbortWatchDogAbort(Thread *pThread) { abortType = EEPolicy::TA_Rude; } - else if (pThread->m_AbortInfo & TAI_ThreadV1Abort) - { - abortType = EEPolicy::TA_V1Compatible; - } else if (pThread->m_AbortInfo & TAI_ThreadAbort) { abortType = EEPolicy::TA_Safe; @@ -2250,7 +2242,7 @@ void Thread::MarkThreadForAbort(ThreadAbortRequester requester, EEPolicy::Thread } CONTRACTL_END; - _ASSERTE ((requester & TAR_StackOverflow) == 0 || (requester & TAR_Thread) == TAR_Thread); + _ASSERTE ((requester & TAR_Thread) == TAR_Thread); AbortRequestLockHolder lh(this); @@ -2282,10 +2274,6 @@ void Thread::MarkThreadForAbort(ThreadAbortRequester requester, EEPolicy::Thread { abortInfo |= TAI_ThreadRudeAbort; } - else if (abortType == EEPolicy::TA_V1Compatible) - { - abortInfo |= TAI_ThreadV1Abort; - } } if (requester & TAR_FuncEval) @@ -2298,10 +2286,6 @@ void Thread::MarkThreadForAbort(ThreadAbortRequester requester, EEPolicy::Thread { abortInfo |= TAI_FuncEvalRudeAbort; } - else if (abortType == EEPolicy::TA_V1Compatible) - { - abortInfo |= TAI_FuncEvalV1Abort; - } } if (abortInfo == 0) @@ -2443,7 +2427,6 @@ void Thread::UnmarkThreadForAbort(ThreadAbortRequester requester, BOOL fForce) if ((m_AbortInfo != TAI_ThreadRudeAbort) || fForce) { m_AbortInfo &= ~(TAI_ThreadAbort | - TAI_ThreadV1Abort | TAI_ThreadRudeAbort ); } } @@ -2451,7 +2434,6 @@ void Thread::UnmarkThreadForAbort(ThreadAbortRequester requester, BOOL fForce) if (requester & TAR_FuncEval) { m_AbortInfo &= ~(TAI_FuncEvalAbort | - TAI_FuncEvalV1Abort | TAI_FuncEvalRudeAbort); } @@ -2462,10 +2444,6 @@ void Thread::UnmarkThreadForAbort(ThreadAbortRequester requester, BOOL fForce) { m_AbortType = EEPolicy::TA_Rude; } - else if (m_AbortInfo & TAI_AnyV1Abort) - { - m_AbortType = EEPolicy::TA_V1Compatible; - } else if (m_AbortInfo & TAI_AnySafeAbort) { m_AbortType = EEPolicy::TA_Safe; @@ -3061,10 +3039,7 @@ void Thread::PreWorkForThreadAbort() FastInterlockAnd((ULONG *) &m_State, ~(TS_Interruptible | TS_Interrupted)); ResetUserInterrupted(); - if (IsRudeAbort() && !(m_AbortInfo & (TAI_ADUnloadAbort | - TAI_ADUnloadRudeAbort | - TAI_ADUnloadV1Abort) - )) { + if (IsRudeAbort()) { if (HasLockInCurrentDomain()) { AppDomain *pDomain = GetAppDomain(); // Cannot enable the following assertion. |