summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJonghyun Park <parjong@gmail.com>2017-07-05 10:39:53 +0900
committerJan Kotas <jkotas@microsoft.com>2017-07-04 18:39:53 -0700
commit85e8f7b2e1fca663e55e37f396c85f60e0375935 (patch)
tree0742c1eeda34cc08b344a130cf19e596c0d5b33d /src
parentf738e8861a5705dbd74a3088c0f4a1ee4e15935d (diff)
downloadcoreclr-85e8f7b2e1fca663e55e37f396c85f60e0375935.tar.gz
coreclr-85e8f7b2e1fca663e55e37f396c85f60e0375935.tar.bz2
coreclr-85e8f7b2e1fca663e55e37f396c85f60e0375935.zip
Hide methods in IdDispenser (instead of using DacNotImpl) (#12624)
Diffstat (limited to 'src')
-rw-r--r--src/vm/threads.h20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/vm/threads.h b/src/vm/threads.h
index 801b22e901..93e39156c8 100644
--- a/src/vm/threads.h
+++ b/src/vm/threads.h
@@ -5664,6 +5664,7 @@ private:
DPTR(PTR_Thread) m_idToThread; // map thread ids to threads
DWORD m_idToThreadCapacity; // capacity of the map
+#ifndef DACCESS_COMPILE
void GrowIdToThread()
{
CONTRACTL
@@ -5675,7 +5676,6 @@ private:
}
CONTRACTL_END;
-#ifndef DACCESS_COMPILE
DWORD newCapacity = m_idToThreadCapacity == 0 ? 16 : m_idToThreadCapacity*2;
Thread **newIdToThread = new Thread*[newCapacity];
@@ -5692,11 +5692,8 @@ private:
delete[] m_idToThread;
m_idToThread = newIdToThread;
m_idToThreadCapacity = newCapacity;
-#else
- DacNotImpl();
-#endif // !DACCESS_COMPILE
-
}
+#endif // !DACCESS_COMPILE
public:
IdDispenser() :
@@ -5726,9 +5723,9 @@ public:
return (id > 0) && (id <= m_highestId);
}
+#ifndef DACCESS_COMPILE
void NewId(Thread *pThread, DWORD & newId)
{
-#ifndef DACCESS_COMPILE
WRAPPER_NO_CONTRACT;
DWORD result;
CrstHolder ch(&m_Crst);
@@ -5754,15 +5751,12 @@ public:
newId = result;
if (result < m_idToThreadCapacity)
m_idToThread[result] = pThread;
-
-#else
- DacNotImpl();
-#endif // !DACCESS_COMPILE
}
+#endif // !DACCESS_COMPILE
+#ifndef DACCESS_COMPILE
void DisposeId(DWORD id)
{
-#ifndef DACCESS_COMPILE
CONTRACTL
{
NOTHROW;
@@ -5791,10 +5785,8 @@ public:
}
#endif
}
-#else
- DacNotImpl();
-#endif // !DACCESS_COMPILE
}
+#endif // !DACCESS_COMPILE
Thread *IdToThread(DWORD id)
{