summaryrefslogtreecommitdiff
path: root/src/vm/corhost.cpp
diff options
context:
space:
mode:
authorAustin Wise <AustinWise@gmail.com>2017-03-05 17:51:40 -0800
committerJan Kotas <jkotas@microsoft.com>2017-03-05 17:51:40 -0800
commit51e968b013e9b1582035f202e004ed024f747f4f (patch)
tree25b0b82deb3392cbeacb3be81bbf3c29e11e81cb /src/vm/corhost.cpp
parent118f88dc17c75800ca249330ea41a963d3bae306 (diff)
downloadcoreclr-51e968b013e9b1582035f202e004ed024f747f4f.tar.gz
coreclr-51e968b013e9b1582035f202e004ed024f747f4f.tar.bz2
coreclr-51e968b013e9b1582035f202e004ed024f747f4f.zip
Remove hosting methods that always return false (#9930)
* Remove CLRIoCompletionHosted as it always returns false. * Remove CLRSyncHosted as it always returns false. * Remove CLRMemoryHosted as it always returns false. * Remove CLRTaskHosted as it always returns false. * Remove CLRAssemblyHosted, CLRGCHosted,and CLRSecurityHosted. They are not called. * Remove IsThreadPoolHosted as it always returns false. * Remove EnterRuntime and LeaveRuntime, as they do nothing. * Add back calls to RevertIfImpersonated and GCX_PREEMP. I accidentally deleted the call to RevertIfImpersonated instead of just removing an extra parameter. When I removed the HR_LEAVE_RUNTIME_HOLDER macro from windowsruntime.h, I not only removed a LeaveRuntimeHolder but also a GCX_PREEMP. So I added it back. The holder and GCX_PREEMP where only inserted when the FEATURE_LEAVE_RUNTIME_HOLDER macro was defined. Since it is always defined, I removed it. Also as I understand it, you would always want to have a GCX_PREEMP before calling into the Windows API as not to block the GC, so I'm not sure why you would want to disable it.
Diffstat (limited to 'src/vm/corhost.cpp')
-rw-r--r--src/vm/corhost.cpp82
1 files changed, 1 insertions, 81 deletions
diff --git a/src/vm/corhost.cpp b/src/vm/corhost.cpp
index daf98562e9..75adbada94 100644
--- a/src/vm/corhost.cpp
+++ b/src/vm/corhost.cpp
@@ -2896,7 +2896,6 @@ HRESULT CCLRSecurityAttributeManager::GetDACL(PACL *ppacl)
BOOL bDaclPresent;
BOOL bDaclDefault;
- LeaveRuntimeHolder holder((size_t)(::GetSecurityDescriptorDacl));
::GetSecurityDescriptorDacl(pSA->lpSecurityDescriptor, &bDaclPresent, &pDefaultACL, &bDaclDefault);
}
EX_CATCH
@@ -3233,84 +3232,6 @@ BOOL CExecutionEngine::SetTlsData (void** ppTlsInfo)
#endif // FEATURE_IMPLICIT_TLS
-static VolatilePtr<ClrTlsInfo> g_pDetachedTlsInfo;
-
-BOOL CExecutionEngine::HasDetachedTlsInfo()
-{
- LIMITED_METHOD_CONTRACT;
-
- return g_pDetachedTlsInfo.Load() != NULL;
-}
-
-void CExecutionEngine::CleanupDetachedTlsInfo()
-{
- WRAPPER_NO_CONTRACT;
-
- if (g_pDetachedTlsInfo.Load() == NULL)
- {
- return;
- }
- ClrTlsInfo *head = FastInterlockExchangePointer(g_pDetachedTlsInfo.GetPointer(), NULL);
-
- while (head)
- {
- ClrTlsInfo *node = head;
- head = head->next;
- DeleteTLS(node->data);
- }
-}
-
-void CExecutionEngine::DetachTlsInfo(void **pTlsData)
-{
- LIMITED_METHOD_CONTRACT;
-
- if (pTlsData == NULL)
- {
- return;
- }
-
- if (CExecutionEngine::GetTlsData() == pTlsData)
- {
- CExecutionEngine::SetTlsData(0);
- }
-
-#ifdef HAS_FLS_SUPPORT
- if (fHasFlsSupport && pFlsGetValue(FlsIndex) == pTlsData)
- {
- pFlsSetValue(FlsIndex, NULL);
- }
-#endif
-
- ClrTlsInfo *pTlsInfo = DataToClrTlsInfo(pTlsData);
- // PREFIX_ASSUME needs TLS. If we use it here, we may do memory allocation.
-#if defined(_PREFAST_) || defined(_PREFIX_)
- if (pTlsInfo == NULL) __UNREACHABLE();
-#else
- _ASSERTE(pTlsInfo != NULL);
-#endif // _PREFAST_ || _PREFIX_
-
- if (pTlsInfo->data[TlsIdx_StressLog])
- {
-#ifdef STRESS_LOG
- CantAllocHolder caHolder;
- StressLog::ThreadDetach ((ThreadStressLog *)pTlsInfo->data[TlsIdx_StressLog]);
- pTlsInfo->data[TlsIdx_StressLog] = NULL;
-#else
- _ASSERTE (!"Shouldn't have stress log!");
-#endif
- }
-
- while (TRUE)
- {
- ClrTlsInfo *head = g_pDetachedTlsInfo.Load();
- pTlsInfo->next = head;
- if (FastInterlockCompareExchangePointer(g_pDetachedTlsInfo.GetPointer(), pTlsInfo, head) == head)
- {
- return;
- }
- }
-}
-
//---------------------------------------------------------------------------------------
//
// Returns the current logical thread's data block (ClrTlsInfo::data).
@@ -3464,7 +3385,7 @@ void **CExecutionEngine::CheckThreadState(DWORD slot, BOOL force)
// If we have a thread object or are on a non-fiber thread, we are safe for fiber switching.
if (!fHasFlsSupport ||
GetThread() ||
- ((g_fEEStarted || g_fEEInit) && !CLRTaskHosted()) ||
+ (g_fEEStarted || g_fEEInit) ||
(((size_t)pTlsInfo->data[TlsIdx_ThreadType]) & (ThreadType_GC | ThreadType_Gate | ThreadType_Timer | ThreadType_DbgHelper)))
{
#ifdef _DEBUG
@@ -4005,7 +3926,6 @@ DWORD STDMETHODCALLTYPE CExecutionEngine::WaitForSingleObject(HANDLE handle,
{
STATIC_CONTRACT_WRAPPER;
STATIC_CONTRACT_SO_TOLERANT;
- LeaveRuntimeHolder holder((size_t)(::WaitForSingleObject));
return ::WaitForSingleObject(handle,dwMilliseconds);
}