From: Jan Kotas Date: Wed, 18 Dec 2019 18:46:43 +0000 (-0800) Subject: Reduce predeftlsslot.h to the set that SOS actually depends on (#709) X-Git-Tag: submit/tizen_5.5/20200504.045052~11^2^2~201 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d20f9fe06e41963710a7d2f74d4357e7a3b03f6a;p=platform%2Fcore%2Fdotnet%2Fdiagnostics.git Reduce predeftlsslot.h to the set that SOS actually depends on (#709) --- diff --git a/src/inc/predeftlsslot.h b/src/inc/predeftlsslot.h index b2a3f6b49..8a4b641bf 100644 --- a/src/inc/predeftlsslot.h +++ b/src/inc/predeftlsslot.h @@ -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. @@ -18,45 +19,7 @@ // 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 -