https://git.reactos.org/?p=reactos.git;a=commitdiff;h=42730f9373fb340bb0dd5…
commit 42730f9373fb340bb0dd5639bc36d3c898d5999a
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Sun Jan 13 13:35:51 2019 +0100
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Mon Mar 4 21:58:42 2019 +0100
[NTOS:EX] Fix 64 bit issues in ExfWaitForRundownProtectionReleaseCacheAware
---
ntoskrnl/ex/rundown.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/ntoskrnl/ex/rundown.c b/ntoskrnl/ex/rundown.c
index e413fa2c7d..be9e6fc6f2 100644
--- a/ntoskrnl/ex/rundown.c
+++ b/ntoskrnl/ex/rundown.c
@@ -440,7 +440,7 @@ ExfWaitForRundownProtectionReleaseCacheAware(IN
PEX_RUNDOWN_REF_CACHE_AWARE RunR
PEX_RUNDOWN_REF RunRef;
EX_RUNDOWN_WAIT_BLOCK WaitBlock;
PEX_RUNDOWN_WAIT_BLOCK WaitBlockPointer;
- ULONG ProcCount, Current, Value, OldValue, TotalCount;
+ ULONG_PTR ProcCount, Current, Value, OldValue, TotalCount;
ProcCount = RunRefCacheAware->Number;
/* No proc, nothing to do */
@@ -480,7 +480,7 @@ ExfWaitForRundownProtectionReleaseCacheAware(IN
PEX_RUNDOWN_REF_CACHE_AWARE RunR
}
/* Sanity check: we didn't overflow */
- ASSERT((LONG)TotalCount >= 0);
+ ASSERT((LONG_PTR)TotalCount >= 0);
if (TotalCount != 0)
{
/* Init the waitblock event */
@@ -490,8 +490,8 @@ ExfWaitForRundownProtectionReleaseCacheAware(IN
PEX_RUNDOWN_REF_CACHE_AWARE RunR
/* Do we have to wait? If so, go ahead! */
if (InterlockedExchangeAddSizeT(&WaitBlock.Count,
- (LONG)TotalCount >> EX_RUNDOWN_COUNT_SHIFT)
==
- -(LONG)(TotalCount >>
EX_RUNDOWN_COUNT_SHIFT))
+ (LONG_PTR)TotalCount >>
EX_RUNDOWN_COUNT_SHIFT) ==
+ -(LONG_PTR)(TotalCount >>
EX_RUNDOWN_COUNT_SHIFT))
{
KeWaitForSingleObject(&WaitBlock.WakeEvent, Executive, KernelMode, FALSE,
NULL);
}