diff options
author | Steve MacLean <stmaclea@microsoft.com> | 2019-03-05 06:29:18 -0500 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2019-03-05 03:29:18 -0800 |
commit | dc11162e1c36624d3cabb6e0bf6583a94ab2e30c (patch) | |
tree | eb44fd174038cecc76e18a482bd1478d2434c3af /src/vm/threadpoolrequest.h | |
parent | b54752c8869f55c82cc24b49fbb1b48a87090943 (diff) | |
download | coreclr-dc11162e1c36624d3cabb6e0bf6583a94ab2e30c.tar.gz coreclr-dc11162e1c36624d3cabb6e0bf6583a94ab2e30c.tar.bz2 coreclr-dc11162e1c36624d3cabb6e0bf6583a94ab2e30c.zip |
Remove dead AppDomain unload code (#23026)
Diffstat (limited to 'src/vm/threadpoolrequest.h')
-rw-r--r-- | src/vm/threadpoolrequest.h | 58 |
1 files changed, 4 insertions, 54 deletions
diff --git a/src/vm/threadpoolrequest.h b/src/vm/threadpoolrequest.h index 3d2dc3da82..17df7a790f 100644 --- a/src/vm/threadpoolrequest.h +++ b/src/vm/threadpoolrequest.h @@ -50,7 +50,7 @@ public: virtual void SetAppDomainRequestsActive() = 0; //This functions marks the end of requests queued for this domain. - virtual void ClearAppDomainRequestsActive(BOOL bADU = FALSE) = 0; + virtual void ClearAppDomainRequestsActive() = 0; //Clears the "active" flag if it was set, and returns whether it was set. virtual bool TakeActiveRequest() = 0; @@ -61,14 +61,10 @@ public: virtual void SetTPIndexUnused() = 0; virtual BOOL IsTPIndexUnused() = 0; virtual void SetTPIndex(TPIndex index) = 0; - virtual void SetAppDomainUnloading() = 0; - virtual void ClearAppDomainUnloading() = 0; }; typedef DPTR(IPerAppDomainTPCount) PTR_IPerAppDomainTPCount; -static const LONG ADUnloading = -1; - #ifdef _MSC_VER // Disable this warning - we intentionally want __declspec(align()) to insert padding for us #pragma warning(disable: 4324) // structure was padded due to __declspec(align()) @@ -101,11 +97,11 @@ public: LIMITED_METHOD_CONTRACT; LONG count = VolatileLoad(&m_numRequestsPending); - return count != ADUnloading && count > 0; + return count > 0; } void SetAppDomainRequestsActive(); - void ClearAppDomainRequestsActive(BOOL bADU); + void ClearAppDomainRequestsActive(); bool TakeActiveRequest(); inline void SetAppDomainId(ADID id) @@ -115,7 +111,6 @@ public: //has started running yet. That implies, no requests should be pending //or dispatched to this structure yet. - _ASSERTE(VolatileLoad(&m_numRequestsPending) != ADUnloading); _ASSERTE(m_id.m_dwId == 0); m_id = id; @@ -128,7 +123,6 @@ public: //has started running yet. That implies, no requests should be pending //or dispatched to this structure yet. - _ASSERTE(VolatileLoad(&m_numRequestsPending) != ADUnloading); _ASSERTE(m_id.m_dwId == 0); _ASSERTE(m_index.m_dwIndex == UNUSED_THREADPOOL_INDEX); @@ -144,7 +138,6 @@ public: //added removed at this time. So, make sure that the per-appdomain structures that //have been cleared(reclaimed) don't have any pending requests to them. - _ASSERTE(VolatileLoad(&m_numRequestsPending) != ADUnloading); _ASSERTE(m_id.m_dwId == 0); return TRUE; @@ -165,19 +158,6 @@ public: m_index.m_dwIndex = UNUSED_THREADPOOL_INDEX; } - inline void SetAppDomainUnloading() - { - LIMITED_METHOD_CONTRACT; - VolatileStore(&m_numRequestsPending, ADUnloading); - } - - inline void ClearAppDomainUnloading(); - - inline BOOL IsAppDomainUnloading() - { - return VolatileLoad(&m_numRequestsPending) == ADUnloading; - } - void DispatchWorkItem(bool* foundWork, bool* wasNotRecalled); private: @@ -237,7 +217,7 @@ public: void SetAppDomainRequestsActive(); - inline void ClearAppDomainRequestsActive(BOOL bADU) + inline void ClearAppDomainRequestsActive() { LIMITED_METHOD_CONTRACT; VolatileStore(&m_outstandingThreadRequestCount, (LONG)0); @@ -273,18 +253,6 @@ public: _ASSERT(FALSE); } - inline void SetAppDomainUnloading() - { - WRAPPER_NO_CONTRACT; - _ASSERT(FALSE); - } - - inline void ClearAppDomainUnloading() - { - WRAPPER_NO_CONTRACT; - _ASSERT(FALSE); - } - private: SpinLock m_lock; ULONG m_NumRequests; @@ -317,29 +285,11 @@ class PerAppDomainTPCountList{ public: static void InitAppDomainIndexList(); static void ResetAppDomainIndex(TPIndex index); - static void ResetAppDomainTPCounts(TPIndex index); static bool AreRequestsPendingInAnyAppDomains(); static LONG GetAppDomainIndexForThreadpoolDispatch(); static void SetAppDomainId(TPIndex index, ADID id); static TPIndex AddNewTPIndex(); - static void SetAppDomainUnloading(TPIndex index) - { - WRAPPER_NO_CONTRACT; - IPerAppDomainTPCount * pAdCount = dac_cast<PTR_IPerAppDomainTPCount> (s_appDomainIndexList.Get(index.m_dwIndex-1)); - _ASSERTE(pAdCount); - pAdCount->SetAppDomainUnloading(); - } - - static void ClearAppDomainUnloading(TPIndex index) - { - WRAPPER_NO_CONTRACT; - IPerAppDomainTPCount * pAdCount = dac_cast<PTR_IPerAppDomainTPCount> (s_appDomainIndexList.Get(index.m_dwIndex-1)); - _ASSERTE(pAdCount); - pAdCount->ClearAppDomainUnloading(); - } - typedef Holder<TPIndex, SetAppDomainUnloading, ClearAppDomainUnloading> AppDomainUnloadingHolder; - inline static IPerAppDomainTPCount* GetPerAppdomainCount(TPIndex index) { return dac_cast<PTR_IPerAppDomainTPCount>(s_appDomainIndexList.Get(index.m_dwIndex-1)); |