From a9757a1ab0d83224012e1df7ebff4c2200cc8a83 Mon Sep 17 00:00:00 2001 From: Thomas Faber Date: Fri, 19 May 2017 19:11:14 +0000 Subject: [PATCH] [NTDLL:LDR] - Fix logic error in LdrpInit that caused us to busy-wait instead of sleep. This makes LibreOffice start up in a few seconds instead of sitting around at 100% CPU for a minute or two. CORE-13268 #resolve svn path=/trunk/; revision=74600 --- reactos/dll/ntdll/ldr/ldrinit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/dll/ntdll/ldr/ldrinit.c b/reactos/dll/ntdll/ldr/ldrinit.c index 614c290ba9e..f62b93ef65a 100644 --- a/reactos/dll/ntdll/ldr/ldrinit.c +++ b/reactos/dll/ntdll/ldr/ldrinit.c @@ -2223,11 +2223,11 @@ LdrpInit(PCONTEXT Context, 1, 0) == 1) { - /* Set the timeout to 30 seconds */ + /* Set the timeout to 30 milliseconds */ Timeout.QuadPart = Int32x32To64(30, -10000); /* Make sure the status hasn't changed */ - while (!LdrpProcessInitialized) + while (LdrpProcessInitialized == 1) { /* Do the wait */ ZwDelayExecution(FALSE, &Timeout);