Author: sginsberg
Date: Sat Oct 11 04:39:08 2008
New Revision: 36712
URL:
http://svn.reactos.org/svn/reactos?rev=36712&view=rev
Log:
- Fix portable Ex/ExfInterlockedCompareExchange64 to compare Destination with the
Comparand instead of...itself?
Modified:
trunk/reactos/ntoskrnl/ex/fastinterlck.c
Modified: trunk/reactos/ntoskrnl/ex/fastinterlck.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/fastinterlck.c…
==============================================================================
--- trunk/reactos/ntoskrnl/ex/fastinterlck.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ex/fastinterlck.c [iso-8859-1] Sat Oct 11 04:39:08 2008
@@ -105,12 +105,12 @@
FASTCALL
ExfInterlockedCompareExchange64(IN OUT LONGLONG volatile *Destination,
IN PLONGLONG Exchange,
- IN PLONGLONG Comperand)
+ IN PLONGLONG Comparand)
{
LONGLONG Result;
Result = *Destination;
- if (*Destination == Result) *Destination = *Exchange;
+ if (*Destination == *Comparand) *Destination = *Exchange;
return Result;
}
@@ -306,7 +306,7 @@
KeAcquireSpinLock(Lock, &OldIrql);
Result = *Destination;
- if (*Destination == Result) *Destination = *Exchange;
+ if (*Destination == *Comparand) *Destination = *Exchange;
KeReleaseSpinLock(Lock, OldIrql);
return Result;
}