diff options
author | Ben Adams <thundercat@illyriad.co.uk> | 2016-08-09 21:40:09 +0100 |
---|---|---|
committer | Ben Adams <thundercat@illyriad.co.uk> | 2016-08-09 21:40:09 +0100 |
commit | 2e0332af6a6889e350c229dac5293b9e3d9b60a3 (patch) | |
tree | fe52e28a29b3c7c160a20a992460e3c9d92b739d | |
parent | cd0d60049463b3eb1a598976b494dfe6af8e572b (diff) | |
download | coreclr-2e0332af6a6889e350c229dac5293b9e3d9b60a3.tar.gz coreclr-2e0332af6a6889e350c229dac5293b9e3d9b60a3.tar.bz2 coreclr-2e0332af6a6889e350c229dac5293b9e3d9b60a3.zip |
PR feedback
-rw-r--r-- | src/vm/threadpoolrequest.h | 36 | ||||
-rw-r--r-- | src/vm/win32threadpool.cpp | 6 | ||||
-rw-r--r-- | src/vm/win32threadpool.h | 2 |
3 files changed, 17 insertions, 27 deletions
diff --git a/src/vm/threadpoolrequest.h b/src/vm/threadpoolrequest.h index af381c02fc..07bcbb7dba 100644 --- a/src/vm/threadpoolrequest.h +++ b/src/vm/threadpoolrequest.h @@ -174,17 +174,13 @@ public: void DispatchWorkItem(bool* foundWork, bool* wasNotRecalled); private: - struct { - ADID m_id; - TPIndex m_index; - }; - struct { - DECLSPEC_ALIGN(64) struct { - BYTE padding1[64 - sizeof(LONG)]; - // Only use with VolatileLoad+VolatileStore+FastInterlockCompareExchange - LONG m_numRequestsPending; - BYTE padding2[64]; - }; + ADID m_id; + TPIndex m_index; + DECLSPEC_ALIGN(64) struct { + BYTE m_padding1[64 - sizeof(LONG)]; + // Only use with VolatileLoad+VolatileStore+FastInterlockCompareExchange + LONG m_numRequestsPending; + BYTE m_padding2[64]; }; }; @@ -283,17 +279,13 @@ public: } private: - struct { - SpinLock m_lock; - ULONG m_NumRequests; - }; - struct { - DECLSPEC_ALIGN(64) struct { - BYTE padding1[64 - sizeof(LONG)]; - // Only use with VolatileLoad+VolatileStore+FastInterlockCompareExchange - LONG m_outstandingThreadRequestCount; - BYTE padding2[64]; - }; + SpinLock m_lock; + ULONG m_NumRequests; + DECLSPEC_ALIGN(64) struct { + BYTE m_padding1[64 - sizeof(LONG)]; + // Only use with VolatileLoad+VolatileStore+FastInterlockCompareExchange + LONG m_outstandingThreadRequestCount; + BYTE m_padding2[64]; }; }; diff --git a/src/vm/win32threadpool.cpp b/src/vm/win32threadpool.cpp index 7219bdaf61..cc58cead31 100644 --- a/src/vm/win32threadpool.cpp +++ b/src/vm/win32threadpool.cpp @@ -4987,10 +4987,8 @@ DWORD __stdcall ThreadpoolMgr::TimerThreadStart(LPVOID p) if (pThread == NULL) return 0; - if (pTimerThread != pThread) { - pTimerThread = pThread; - // Timer threads never die - } + pTimerThread = pThread; + // Timer threads never die LastTickCount = GetTickCount(); diff --git a/src/vm/win32threadpool.h b/src/vm/win32threadpool.h index a7ab5a7145..0ca01f8b65 100644 --- a/src/vm/win32threadpool.h +++ b/src/vm/win32threadpool.h @@ -378,12 +378,12 @@ public: Counts GetCleanCounts() { + LIMITED_METHOD_CONTRACT; #ifdef _WIN64 // VolatileLoad x64 bit read is atomic return DangerousGetDirtyCounts(); #else // !_WIN64 // VolatileLoad may result in torn read - LIMITED_METHOD_CONTRACT; Counts result; #ifndef DACCESS_COMPILE result.AsLongLong = FastInterlockCompareExchangeLong(&counts.AsLongLong, 0, 0); |