-
-
Save kevingosse/8c2d5b6301930d9dff9e613f7c980ec7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Module::SetDynamicIL(mdToken token, TADDR blobAddress, BOOL fTemporaryOverride) | |
{ | |
DynamicILBlobEntry entry = {mdToken(token), TADDR(blobAddress)}; | |
// Lazily allocate a Crst to serialize update access to the info structure. | |
// Carefully synchronize to ensure we don't leak a Crst in race conditions. | |
if (m_debuggerSpecificData.m_pDynamicILCrst == NULL) | |
{ | |
InitializeDynamicILCrst(); | |
} | |
CrstHolder ch(m_debuggerSpecificData.m_pDynamicILCrst); | |
// Figure out which table to fill in | |
PTR_DynamicILBlobTable &table(fTemporaryOverride ? m_debuggerSpecificData.m_pTemporaryILBlobTable | |
: m_debuggerSpecificData.m_pDynamicILBlobTable); | |
// Lazily allocate the hash table. | |
if (table == NULL) | |
{ | |
table = PTR_DynamicILBlobTable(new DynamicILBlobTable); | |
} | |
table->AddOrReplace(entry); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment