summaryrefslogtreecommitdiff
path: root/src/vm/threads.h
diff options
context:
space:
mode:
authorJan Vorlicek <janvorli@microsoft.com>2018-11-13 22:51:20 +0100
committerGitHub <noreply@github.com>2018-11-13 22:51:20 +0100
commit89262cf66efe776a17c322efcbe896cc3073b446 (patch)
tree1cee8eb56dcb1982766a0ae04c4ccc75e0d2273b /src/vm/threads.h
parente586793e0fbf0fa3d42e4519663ed2d977198a23 (diff)
downloadcoreclr-89262cf66efe776a17c322efcbe896cc3073b446.tar.gz
coreclr-89262cf66efe776a17c322efcbe896cc3073b446.tar.bz2
coreclr-89262cf66efe776a17c322efcbe896cc3073b446.zip
Change GetAppDomain to return AppDomain from the global static (#20910)
* Change GetAppDomain to return it from the global static The current implementation of the GetAppDomain takes it from the TLS for the current thread. But we only have one AppDomain in the system, so we can change it to return just that one. I have still left the ThreadLocalInfo.m_pAppDomain and its setter present, because SOS uses that to access the AppDomain and the SOS needs to be runtime versino agnostic. This makes it to perform better for Unix where accessing TLS is not trivial. * Move the AppDomain instance pointer to own static To enable access to the one and only AppDomain without unnecessary indirections, I have moved the pointer out of the SystemDomain class.
Diffstat (limited to 'src/vm/threads.h')
-rw-r--r--src/vm/threads.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vm/threads.h b/src/vm/threads.h
index 3aa1681f1e..444d4d48d7 100644
--- a/src/vm/threads.h
+++ b/src/vm/threads.h
@@ -7277,7 +7277,7 @@ class Compiler;
struct ThreadLocalInfo
{
Thread* m_pThread;
- AppDomain* m_pAppDomain;
+ AppDomain* m_pAppDomain; // This field is read only by the SOS plugin to get the AppDomain
void** m_EETlsData; // ClrTlsInfo::data
};