mirror of
https://github.com/reactos/reactos.git
synced 2024-11-23 11:33:31 +08:00
[NTOS:EX] Fix 64 bit issues in ExfWaitForRundownProtectionReleaseCacheAware
This commit is contained in:
parent
252114a3a1
commit
42730f9373
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user