diff options
author | David Wrighton <davidwr@microsoft.com> | 2019-04-03 15:54:05 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-03 15:54:05 -0700 |
commit | d3e39bc2f81e3dbf9e4b96347f62b49d8700336c (patch) | |
tree | 78b72499a0f38e9dbf6ae4d6d24c77779ac543dc /src/vm/gcenv.h | |
parent | a7dd6192530dec1d424c359233a1b92f559fa92a (diff) | |
download | coreclr-d3e39bc2f81e3dbf9e4b96347f62b49d8700336c.tar.gz coreclr-d3e39bc2f81e3dbf9e4b96347f62b49d8700336c.tar.bz2 coreclr-d3e39bc2f81e3dbf9e4b96347f62b49d8700336c.zip |
Remove ADID and ADIndex from CoreCLR (#23588)
- Remove concept of AppDomain from object api in VM
- Various infrastructure around entering/leaving appdomains is removed
- Add small implementation of GetAppDomain for use by DAC (to match existing behavior)
- Simplify finalizer thread operations
- Eliminate AppDomain::Terminate
- Remove use of ADID from stresslog
- Remove thread enter/leave tracking from AppDomain
- Remove unused asm constants across all architectures
- Re-order header inclusion order to put gcenv.h before handletable
- Remove retail only sync block code involving appdomain index
Diffstat (limited to 'src/vm/gcenv.h')
-rw-r--r-- | src/vm/gcenv.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/vm/gcenv.h b/src/vm/gcenv.h index 767adb892c..162c14557e 100644 --- a/src/vm/gcenv.h +++ b/src/vm/gcenv.h @@ -68,4 +68,22 @@ namespace ETW #define _tfopen _wfopen #endif +// ----------------------------------------------------------------------------------------------------------- +// +// AppDomain emulation. We don't have these in the CLR anymore so instead we emulate the bare minimum of the API +// touched by the GC/HandleTable and pretend we have precisely one (default) appdomain. +// + +#define RH_DEFAULT_DOMAIN_ID 1 + +struct ADIndex +{ + DWORD m_dwIndex; + + ADIndex () : m_dwIndex(RH_DEFAULT_DOMAIN_ID) {} + explicit ADIndex (DWORD id) : m_dwIndex(id) {} + BOOL operator==(const ADIndex& ad) const { return m_dwIndex == ad.m_dwIndex; } + BOOL operator!=(const ADIndex& ad) const { return m_dwIndex != ad.m_dwIndex; } +}; + #endif // GCENV_H_ |