diff options
Diffstat (limited to 'src/vm/crst.cpp')
-rw-r--r-- | src/vm/crst.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/vm/crst.cpp b/src/vm/crst.cpp index 72665493a4..9ecdee748d 100644 --- a/src/vm/crst.cpp +++ b/src/vm/crst.cpp @@ -653,9 +653,9 @@ void CrstBase::PostEnter() } _ASSERTE((m_entercount == 0 && m_holderthreadid.IsUnknown()) || - m_holderthreadid.IsSameThread() || + m_holderthreadid.IsCurrentThread() || IsAtProcessExit()); - m_holderthreadid.SetThreadId(); + m_holderthreadid.SetToCurrentThread(); m_entercount++; if (m_entercount == 1) @@ -715,7 +715,7 @@ void CrstBase::PreLeave() _ASSERTE(m_entercount > 0); m_entercount--; if (!m_entercount) { - m_holderthreadid.ResetThreadId(); + m_holderthreadid.Clear(); // Delink it from the Thread's chain of OwnedChain if (m_prev) @@ -796,7 +796,7 @@ void CrstBase::DebugInit(CrstType crstType, CrstFlags flags) m_crstType = crstType; m_tag = GetCrstName(crstType); m_crstlevel = GetCrstLevel(crstType); - m_holderthreadid.ResetThreadId(); + m_holderthreadid.Clear(); m_entercount = 0; m_next = NULL; m_prev = NULL; @@ -868,7 +868,7 @@ void CrstBase::DebugDestroy() } FillMemory(&m_criticalsection, sizeof(m_criticalsection), 0xcc); - m_holderthreadid.ResetThreadId(); + m_holderthreadid.Clear(); m_entercount = 0xcccccccc; m_next = (CrstBase*)POISONC; @@ -914,7 +914,7 @@ BOOL CrstBase::IsSafeToTake() (GCHeap::IsGCInProgress() && pThread == ThreadSuspend::GetSuspensionThread())); END_GETTHREAD_ALLOWED; - if (m_holderthreadid.IsSameThread()) + if (m_holderthreadid.IsCurrentThread()) { // If we already hold it, we can't violate level order. // Check if client wanted to allow reentrancy. @@ -949,7 +949,7 @@ BOOL CrstBase::IsSafeToTake() for (CrstBase *pcrst = GetThreadsOwnedCrsts(); pcrst != NULL; pcrst = pcrst->m_next) { fSafe = - !pcrst->m_holderthreadid.IsSameThread() + !pcrst->m_holderthreadid.IsCurrentThread() || (pcrst->m_crstlevel == CRSTUNORDERED) || (pcrst->m_crstlevel > m_crstlevel) || (pcrst->m_crstlevel == m_crstlevel && (m_dwFlags & CRST_UNSAFE_SAMELEVEL) != 0); |