From 351129dc08c0c57c6c287c8a38c548e3b2e757de Mon Sep 17 00:00:00 2001 From: ReactOS Portable Systems Group Date: Mon, 14 Jul 2008 01:41:44 +0000 Subject: [PATCH] - Force a 5 second wait before loading drivers, on ARM. - Context switching doesn't really work -- but we've been lucky since we're stuck on a priority 31 thread. - Instead of worrying about this later when the system will be fully operational, this forces us to expose these bugs, and to make sure everything works. - This will stress our context switching, waiting, unwaiting and scheduling code on ARM but once it all works well, after 5 seconds we'll be back on track. svn path=/trunk/; revision=34487 --- reactos/ntoskrnl/ex/init.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/reactos/ntoskrnl/ex/init.c b/reactos/ntoskrnl/ex/init.c index c9243ff9d4a..2c8eb5b2a46 100644 --- a/reactos/ntoskrnl/ex/init.c +++ b/reactos/ntoskrnl/ex/init.c @@ -1703,6 +1703,17 @@ Phase1InitializationDiscard(IN PVOID Context) /* Initialize in-place execution support */ XIPInit(LoaderBlock); + +#ifdef _M_ARM + // + // ARM: Force a wait so we can test thread scheduling, timing and context switching + // + DPRINT1("Beginning 5 second wait...\n"); + Timeout.QuadPart = Int32x32To64(5, -10000000); + KeDelayExecutionThread(KernelMode, FALSE, &Timeout); + DPRINT1("Wait complete\n"); + while (TRUE); +#endif /* Set maximum update to 75% */ InbvSetProgressBarSubset(25, 75);