diff --git a/xtoskrnl/ex/rundown.c b/xtoskrnl/ex/rundown.c index 8a22722..40ee5e9 100644 --- a/xtoskrnl/ex/rundown.c +++ b/xtoskrnl/ex/rundown.c @@ -100,7 +100,7 @@ ExReleaseRundownProtection(IN PEX_RUNDOWN_REFERENCE Descriptor) { WaitBlock = (PEX_RUNDOWN_WAIT_BLOCK)(CurrentValue & ~0x1); - if(!RtlInterlockedDecrementLongPtr((PLONG_PTR)&WaitBlock->Count)) + if(!RtlInterlockedDecrement64((PLONG_PTR)&WaitBlock->Count)) { KeSetEvent(&WaitBlock->WakeEvent, 0, FALSE); } diff --git a/xtoskrnl/includes/rtl.h b/xtoskrnl/includes/rtl.h index fb66e69..e14d277 100644 --- a/xtoskrnl/includes/rtl.h +++ b/xtoskrnl/includes/rtl.h @@ -231,7 +231,7 @@ RtlInterlockedCompareExchangePointer(IN VOLATILE PVOID *Destination, XTFASTCALL LONG_PTR -RtlInterlockedDecrementLongPtr(IN VOLATILE PLONG_PTR Addend); +RtlInterlockedDecrement64(IN VOLATILE PLONG_PTR Addend); XTFASTCALL PVOID diff --git a/xtoskrnl/rtl/intrin.c b/xtoskrnl/rtl/intrin.c index d5413f8..1ab1790 100644 --- a/xtoskrnl/rtl/intrin.c +++ b/xtoskrnl/rtl/intrin.c @@ -46,7 +46,7 @@ RtlInterlockedCompareExchangePointer(IN VOLATILE PVOID *Destination, */ XTFASTCALL LONG_PTR -RtlInterlockedDecrementLongPtr(IN VOLATILE PLONG_PTR Addend) +RtlInterlockedDecrement64(IN VOLATILE PLONG_PTR Addend) { return (LONG_PTR)__sync_sub_and_fetch(Addend, 1); }