[SDK:RTL] Statically initialize RtlCriticalSectionList

This might be used before RtlpInitDeferedCriticalSection gets called
This commit is contained in:
Jérôme Gardou 2021-03-03 14:09:08 +01:00
parent 7851ad8635
commit 65b6af58f9

View file

@ -17,7 +17,7 @@
#define MAX_STATIC_CS_DEBUG_OBJECTS 64 #define MAX_STATIC_CS_DEBUG_OBJECTS 64
static RTL_CRITICAL_SECTION RtlCriticalSectionLock; static RTL_CRITICAL_SECTION RtlCriticalSectionLock;
static LIST_ENTRY RtlCriticalSectionList; static LIST_ENTRY RtlCriticalSectionList = {&RtlCriticalSectionList, &RtlCriticalSectionList};
static BOOLEAN RtlpCritSectInitialized = FALSE; static BOOLEAN RtlpCritSectInitialized = FALSE;
static RTL_CRITICAL_SECTION_DEBUG RtlpStaticDebugInfo[MAX_STATIC_CS_DEBUG_OBJECTS]; static RTL_CRITICAL_SECTION_DEBUG RtlpStaticDebugInfo[MAX_STATIC_CS_DEBUG_OBJECTS];
static BOOLEAN RtlpDebugInfoFreeList[MAX_STATIC_CS_DEBUG_OBJECTS]; static BOOLEAN RtlpDebugInfoFreeList[MAX_STATIC_CS_DEBUG_OBJECTS];
@ -265,9 +265,6 @@ VOID
NTAPI NTAPI
RtlpInitDeferedCriticalSection(VOID) RtlpInitDeferedCriticalSection(VOID)
{ {
/* Initialize the Process Critical Section List */
InitializeListHead(&RtlCriticalSectionList);
/* Initialize the CS Protecting the List */ /* Initialize the CS Protecting the List */
RtlInitializeCriticalSection(&RtlCriticalSectionLock); RtlInitializeCriticalSection(&RtlCriticalSectionLock);