[RTL] Satisfy the RtlpTimeoutDisable condition when waiting for critical sections (#4089)

This commit is contained in:
Hermès Bélusca-Maïto 2021-11-06 19:40:40 +01:00
parent dff55c9d33
commit 56417bfb93
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0

View file

@ -158,14 +158,14 @@ RtlpWaitForCriticalSection(PRTL_CRITICAL_SECTION CriticalSection)
Status = NtWaitForKeyedEvent(NULL, Status = NtWaitForKeyedEvent(NULL,
CriticalSection, CriticalSection,
FALSE, FALSE,
&RtlpTimeout); (RtlpTimeoutDisable ? NULL : &RtlpTimeout));
} }
else else
{ {
/* Wait on the Event */ /* Wait on the Event */
Status = NtWaitForSingleObject(CriticalSection->LockSemaphore, Status = NtWaitForSingleObject(CriticalSection->LockSemaphore,
FALSE, FALSE,
&RtlpTimeout); (RtlpTimeoutDisable ? NULL : &RtlpTimeout));
} }
/* We have Timed out */ /* We have Timed out */