Author: pschweitzer
Date: Mon Jun 6 17:03:45 2011
New Revision: 52117
URL:
http://svn.reactos.org/svn/reactos?rev=52117&view=rev
Log:
[NTOSKRNL]
Fixes to r52065:
- In IopInterlockedDecrementUlong() and IopInterlockedIncrementUlong(), cast received
value to volatile before de/incrementing it so ensure strict ordering with spin locks
acquisition.
This was brought to you by Alex Ionescu.
Modified:
trunk/reactos/ntoskrnl/io/iomgr/volume.c
Modified: trunk/reactos/ntoskrnl/io/iomgr/volume.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/volume.c…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/volume.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/volume.c [iso-8859-1] Mon Jun 6 17:03:45 2011
@@ -314,7 +314,7 @@
ULONG OldValue;
Irql = KeAcquireQueuedSpinLock(Queue);
- OldValue = (*Ulong)++;
+ OldValue = ((volatile ULONG)*Ulong)++;
KeReleaseQueuedSpinLock(Queue, Irql);
return OldValue;
@@ -332,7 +332,7 @@
ULONG OldValue;
Irql = KeAcquireQueuedSpinLock(Queue);
- OldValue = (*Ulong)--;
+ OldValue = ((volatile ULONG)*Ulong)--;
KeReleaseQueuedSpinLock(Queue, Irql);
return OldValue;