Skip to content

Commit

Permalink
Add warning banner and sos threads -special fix
Browse files Browse the repository at this point in the history
Commit migrated from dotnet/coreclr@3195e80
  • Loading branch information
mikem8361 committed May 22, 2019
1 parent 60fdea4 commit 67c7da9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
9 changes: 8 additions & 1 deletion src/coreclr/src/inc/predeftlsslot.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
#ifndef __PREDEFTLSSLOT_H__
#define __PREDEFTLSSLOT_H__

// ******************************************************************************
// WARNING!!!: These enums are used by SOS in the diagnostics repo. Values should
// added or removed in a backwards and forwards compatible way.
// See: https://github.com/dotnet/diagnostics/blob/master/src/inc/predeftlsslot.h
// ******************************************************************************

// And here are the predefined slots for accessing TLS from various DLLs of the CLR.
// Note that we want to support combinations of Debug and Retail DLLs for testing
Expand All @@ -20,14 +25,14 @@ enum PredefinedTlsSlots
TlsIdx_JitLogEnv,
TlsIdx_IceCap,
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_CantStopCount, // Can't-stop counter for any thread
TlsIdx_OwnedCrstsChain, // slot to store the Crsts owned by this thread
TlsIdx_AppDomainAgilePendingTable,
TlsIdx_CantAllocCount, //Can't allocate memory on heap in this thread
Expand Down Expand Up @@ -77,5 +82,7 @@ enum TlsThreadTypeFlag // flag used for thread type in Tls data
ThreadType_GenericInstantiationCompare= 0x00020000, // Used to indicate that the thread is determining if a generic instantiation in an ngen image matches a lookup.
};

static_assert(TlsIdx_ThreadType == 11, "SOS in diagnostics repo has a dependency on this value.");

#endif

5 changes: 4 additions & 1 deletion src/coreclr/src/inc/tls.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
// Encapsulates TLS access for maximum performance.
//


// **************************************************************************************
// WARNING!!!: These values are used by SOS in the diagnostics repo and need to the same.
// See: https://github.com/dotnet/diagnostics/blob/master/src/inc/tls.h
// **************************************************************************************

#ifndef __tls_h__
#define __tls_h__
Expand Down

0 comments on commit 67c7da9

Please sign in to comment.