Reduce predeftlsslot.h to the set that SOS actually depends on (#709)
authorJan Kotas <jkotas@microsoft.com>
Wed, 18 Dec 2019 18:46:43 +0000 (10:46 -0800)
committerMike McLaughlin <mikem@microsoft.com>
Wed, 18 Dec 2019 18:46:43 +0000 (10:46 -0800)
src/inc/predeftlsslot.h

index b2a3f6b49bd37f37724973174c3c1e8bf27e4ef2..8a4b641bfd1b1eedc431f548bd8f40f6a8485362 100644 (file)
@@ -8,8 +8,9 @@
 #define __PREDEFTLSSLOT_H__
 
 // ******************************************************************************
-// WARNING!!!: This header is also used by the coreclr repo.
-// See: https://github.com/dotnet/coreclr/blob/master/src/inc/predeftlsslot.h
+// WARNING!!!: This header is subset of
+// https://github.com/dotnet/runtime/blob/master/src/coreclr/src/inc/predeftlsslot.h
+// that SOS depends on.
 // ******************************************************************************
 
 // And here are the predefined slots for accessing TLS from various DLLs of the CLR.
 // them.
 enum PredefinedTlsSlots
 {
-    TlsIdx_StrongName,
-    TlsIdx_JitPerf,
-    TlsIdx_JitX86Perf,
-    TlsIdx_JitLogEnv,
-    TlsIdx_AssertDlgStatus, // Whether the thread is displaying an assert dialog
-    TlsIdx_StressLog,
-    TlsIdx_CantStopCount, // Can't-stop counter for any thread
-    TlsIdx_Check,
-    TlsIdx_ForbidGCLoaderUseCount,
-    TlsIdx_ClrDebugState,         // Pointer to ClrDebugState* structure
-    TlsIdx_StressThread,
-
-    // Add more indices here.
-    TlsIdx_ThreadType, // bit flags to indicate special thread's type 
-    TlsIdx_OwnedCrstsChain, // slot to store the Crsts owned by this thread
-    TlsIdx_CantAllocCount, //Can't allocate memory on heap in this thread
-
-    // A transient thread value that indicates this thread is currently walking its stack
-    // or the stack of another thread. This value is useful to help short-circuit
-    // some problematic checks in the loader, guarantee that types & assemblies
-    // encountered during the walk must already be loaded, and provide information to control
-    // assembly loading behavior during stack walks.
-    // 
-    // This value is set around the main portions of the stack walk (as those portions may
-    // enter the type & assembly loaders). This is also explicitly cleared while the
-    // walking thread calls the stackwalker callback or needs to execute managed code, as
-    // such calls may execute arbitrary code unrelated to the actual stack walking, and        
-    // may never return, in the case of exception stackwalk callbacks.
-    TlsIdx_StackWalkerWalkingThread, // Thread* that the stack walker is currently walking.
-
-    // Save the last exception info.  Sometimes we need this info in our EX_CATCH, such as for SO.
-    // It will be better if VC can supply this in catch(...) block.
-    // !!! These data may become stale.  Use it only inside exception handling code.
-    // !!! Please access these fields through GetCurrentExceptionPointers which validates the data to some level.
-    TlsIdx_EXCEPTION_CODE,
-    TlsIdx_PEXCEPTION_RECORD,
-    TlsIdx_PCONTEXT,
-
-    MAX_PREDEFINED_TLS_SLOT
+    TlsIdx_ThreadType = 11 // bit flags to indicate special thread's type
 };
 
 enum TlsThreadTypeFlag // flag used for thread type in Tls data
@@ -76,8 +39,6 @@ enum TlsThreadTypeFlag // flag used for thread type in Tls data
     ThreadType_ProfAPI_Attach           = 0x00004000,
     ThreadType_ProfAPI_Detach           = 0x00008000,
     ThreadType_ETWRundownThread         = 0x00010000,
-    ThreadType_GenericInstantiationCompare= 0x00020000, // Used to indicate that the thread is determining if a generic instantiation in an ngen image matches a lookup. 
 };
 
 #endif
-