[NTDLL] Initialize keyed event for condition variables

This commit is contained in:
Timo Kreuzer 2023-08-12 19:33:46 +03:00
parent fed7ee70a6
commit 86f2d4cd4e
5 changed files with 15 additions and 1 deletions

View file

@ -226,4 +226,9 @@ RtlDoesFileExists_UStr(
IN PUNICODE_STRING FileName
);
VOID
NTAPI
RtlpInitializeKeyedEvent(
VOID);
/* EOF */

View file

@ -2405,6 +2405,11 @@ LdrpInitializeProcess(IN PCONTEXT Context,
/* Check whether all static imports were properly loaded and return here */
if (!NT_SUCCESS(ImportStatus)) return ImportStatus;
#if (DLL_EXPORT_VERSION >= _WIN32_WINNT_VISTA)
/* Initialize the keyed event for condition variables */
RtlpInitializeKeyedEvent();
#endif
/* Initialize TLS */
Status = LdrpInitializeTls();
if (!NT_SUCCESS(Status))

View file

@ -14,9 +14,11 @@
#include <debug.h>
VOID
NTAPI
RtlpInitializeKeyedEvent(VOID);
VOID
NTAPI
RtlpCloseKeyedEvent(VOID);
BOOL

View file

@ -711,7 +711,7 @@
@ stdcall -version=0x600+ InitOnceBeginInitialize(ptr long ptr ptr)
@ stdcall -version=0x600+ InitOnceComplete(ptr long ptr)
@ stdcall -version=0x600+ InitOnceExecuteOnce(ptr ptr ptr ptr)
@ stdcall -version=0x600+ InitOnceInitialize(ptr) NTDLL.RtlRunOnceInitialize
@ stdcall -version=0x600+ InitOnceInitialize(ptr) ntdll.RtlRunOnceInitialize
@ stdcall -version=0x600+ InitializeConditionVariable(ptr) ntdll.RtlInitializeConditionVariable
@ stdcall InitializeCriticalSection(ptr)
@ stdcall InitializeCriticalSectionAndSpinCount(ptr long)

View file

@ -456,6 +456,7 @@ InternalSleep(IN OUT PRTL_CONDITION_VARIABLE ConditionVariable,
}
VOID
NTAPI
RtlpInitializeKeyedEvent(VOID)
{
ASSERT(CondVarKeyedEventHandle == NULL);
@ -463,6 +464,7 @@ RtlpInitializeKeyedEvent(VOID)
}
VOID
NTAPI
RtlpCloseKeyedEvent(VOID)
{
ASSERT(CondVarKeyedEventHandle != NULL);