https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6f89a48349c0b16ce5937…
commit 6f89a48349c0b16ce59378cbfa842823f38bbadf
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Sat Nov 6 18:43:35 2021 +0100
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Thu Sep 21 13:33:26 2023 +0200
[NTDLL:LDR] Fix process LoadConfig CS timeout conversion from ms to 100ns units (#4089)
For more details, see
https://forums.codeguru.com/showthread.php?370731-EnterCriticalSection-lock…
---
dll/ntdll/ldr/ldrinit.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/dll/ntdll/ldr/ldrinit.c b/dll/ntdll/ldr/ldrinit.c
index ed9774fc0c2..d5a6b37d923 100644
--- a/dll/ntdll/ldr/ldrinit.c
+++ b/dll/ntdll/ldr/ldrinit.c
@@ -1839,7 +1839,7 @@ LdrpInitializeProcess(IN PCONTEXT Context,
/* ReactOS specific: do not clear it. (Windows starts doing the same in later versions) */
//Peb->pShimData = NULL;
- /* Save the number of processors and CS Timeout */
+ /* Save the number of processors and CS timeout */
LdrpNumberOfProcessors = Peb->NumberOfProcessors;
RtlpTimeout = Peb->CriticalSectionTimeout;
@@ -1894,8 +1894,9 @@ LdrpInitializeProcess(IN PCONTEXT Context,
if (VALID_CONFIG_FIELD(GlobalFlagsClear) && LoadConfig->GlobalFlagsClear)
Peb->NtGlobalFlag &= ~LoadConfig->GlobalFlagsClear;
+ /* Convert the default CS timeout from milliseconds to 100ns units */
if (VALID_CONFIG_FIELD(CriticalSectionDefaultTimeout) && LoadConfig->CriticalSectionDefaultTimeout)
- RtlpTimeout.QuadPart = Int32x32To64(LoadConfig->CriticalSectionDefaultTimeout, -10000000);
+ RtlpTimeout.QuadPart = Int32x32To64(LoadConfig->CriticalSectionDefaultTimeout, -10000);
if (VALID_CONFIG_FIELD(DeCommitFreeBlockThreshold) && LoadConfig->DeCommitFreeBlockThreshold)
HeapParameters.DeCommitFreeBlockThreshold = LoadConfig->DeCommitFreeBlockThreshold;
@@ -1935,12 +1936,9 @@ LdrpInitializeProcess(IN PCONTEXT Context,
&CommandLine);
}
- /* If the timeout is too long */
+ /* If the CS timeout is longer than 1 hour, disable it */
if (RtlpTimeout.QuadPart < Int32x32To64(3600, -10000000))
- {
- /* Then disable CS Timeout */
RtlpTimeoutDisable = TRUE;
- }
/* Initialize Critical Section Data */
RtlpInitDeferredCriticalSection();
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4651faeaa2030cb60314d…
commit 4651faeaa2030cb60314d50866f63e83cf8375fe
Author: Julio Carchi <juliocarchi(a)yahoo.com>
AuthorDate: Wed Sep 20 13:57:04 2023 -0500
Commit: GitHub <noreply(a)github.com>
CommitDate: Wed Sep 20 18:57:04 2023 +0000
[BOOTDATA] Add TEMP folder to livecd image (#5683)
Create the folder TEMP in X:\reactos so now we can match current livecd
environment variables TMP and TEMP
can be seen as a part of solving CORE-13041
The use-case for that is:
copying the livecd folder structure directly to writable media as USB sticks or memory cards,
will work then out-of-the-box without any other change.
---
boot/boot_images.cmake | 3 +++
1 file changed, 3 insertions(+)
diff --git a/boot/boot_images.cmake b/boot/boot_images.cmake
index 877cf28bb4a..ae3e600c05b 100644
--- a/boot/boot_images.cmake
+++ b/boot/boot_images.cmake
@@ -141,6 +141,9 @@ add_custom_target(bootcdregtest
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/livecd.cmake.lst "")
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/livecd.cmake.lst "${CMAKE_CURRENT_BINARY_DIR}/empty\n")
+# Create TEMP dir
+file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/livecd.cmake.lst "reactos/TEMP=${CMAKE_CURRENT_BINARY_DIR}/empty\n")
+
# Create user profile directories
add_allusers_profile_dirs(${CMAKE_CURRENT_BINARY_DIR}/livecd.cmake.lst "Profiles")
add_user_profile_dirs(${CMAKE_CURRENT_BINARY_DIR}/livecd.cmake.lst "Profiles" "Default User")