mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
Make sure compiler doesn't optimize our wait loop away. Patch by Thomas Weidenmueller
svn path=/trunk/; revision=20468
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user