https://git.reactos.org/?p=reactos.git;a=commitdiff;h=56417bfb930f62acd80ce2...
commit 56417bfb930f62acd80ce261a64d2c3437786555 Author: Hermès Bélusca-Maïto hermes.belusca-maito@reactos.org AuthorDate: Sat Nov 6 19:40:40 2021 +0100 Commit: Hermès Bélusca-Maïto hermes.belusca-maito@reactos.org CommitDate: Thu Sep 21 13:33:28 2023 +0200
[RTL] Satisfy the RtlpTimeoutDisable condition when waiting for critical sections (#4089) --- sdk/lib/rtl/critical.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sdk/lib/rtl/critical.c b/sdk/lib/rtl/critical.c index c431b3a66df..c70ff191bbc 100644 --- a/sdk/lib/rtl/critical.c +++ b/sdk/lib/rtl/critical.c @@ -158,14 +158,14 @@ RtlpWaitForCriticalSection(PRTL_CRITICAL_SECTION CriticalSection) Status = NtWaitForKeyedEvent(NULL, CriticalSection, FALSE, - &RtlpTimeout); + (RtlpTimeoutDisable ? NULL : &RtlpTimeout)); } else { /* Wait on the Event */ Status = NtWaitForSingleObject(CriticalSection->LockSemaphore, FALSE, - &RtlpTimeout); + (RtlpTimeoutDisable ? NULL : &RtlpTimeout)); }
/* We have Timed out */