diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/vm/threads.cpp | 4 | ||||
-rw-r--r-- | src/vm/threads.h | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/vm/threads.cpp b/src/vm/threads.cpp index abc544338b..91373930e9 100644 --- a/src/vm/threads.cpp +++ b/src/vm/threads.cpp @@ -1363,6 +1363,8 @@ void InitThreadManager() } CONTRACTL_END; + Thread::s_initializeYieldProcessorNormalizedCrst.Init(CrstLeafLock); + // All patched helpers should fit into one page. // If you hit this assert on retail build, there is most likely problem with BBT script. _ASSERTE_ALL_BUILDS("clr/src/VM/threads.cpp", (BYTE*)JIT_PatchedCodeLast - (BYTE*)JIT_PatchedCodeStart < (ptrdiff_t)GetOsPageSize()); @@ -11745,10 +11747,10 @@ ULONGLONG Thread::QueryThreadProcessorUsage() } #endif // FEATURE_APPDOMAIN_RESOURCE_MONITORING +CrstStatic Thread::s_initializeYieldProcessorNormalizedCrst; int Thread::s_yieldsPerNormalizedYield = 0; int Thread::s_optimalMaxNormalizedYieldsPerSpinIteration = 0; -static Crst s_initializeYieldProcessorNormalizedCrst(CrstLeafLock); void Thread::InitializeYieldProcessorNormalized() { LIMITED_METHOD_CONTRACT; diff --git a/src/vm/threads.h b/src/vm/threads.h index be36fe624e..4000f216f4 100644 --- a/src/vm/threads.h +++ b/src/vm/threads.h @@ -5364,6 +5364,7 @@ public: #endif // FEATURE_HIJACK private: + static CrstStatic s_initializeYieldProcessorNormalizedCrst; static int s_yieldsPerNormalizedYield; static int s_optimalMaxNormalizedYieldsPerSpinIteration; |