Make sure compiler doesn't optimize our wait loop away. Patch by Thomas Weidenmueller

svn path=/trunk/; revision=20468
This commit is contained in:
Alex Ionescu
2005-12-30 20:31:11 +00:00
parent 920d3a2408
commit e8ce2b897c
+1 -1
View File
@@ -151,7 +151,7 @@ KiAcquireSpinLock(PKSPIN_LOCK SpinLock)
if (InterlockedBitTestAndSet((PLONG)SpinLock, 0))
{
/* Value changed... wait until it's locked */
while (*SpinLock == 1) YieldProcessor();
while (*(volatile KSPIN_LOCK *)SpinLock == 1) YieldProcessor();
}
else
{