diff --git a/reactos/hal/halx86/generic/cmos.c b/reactos/hal/halx86/generic/cmos.c index de5c443de94..abcf18f970a 100644 --- a/reactos/hal/halx86/generic/cmos.c +++ b/reactos/hal/halx86/generic/cmos.c @@ -35,8 +35,9 @@ HalpAcquireSystemHardwareSpinLock(VOID) /* Try to acquire the lock */ while (InterlockedBitTestAndSet((PLONG)&HalpSystemHardwareLock, 0)) { - /* Lock is held, short wait and try again */ - YieldProcessor(); + /* Lock is held, spin until it's free */ + while (*(volatile ULONG*)HalpSystemHardwareLock & 1) + YieldProcessor(); } /* We have the lock, save the flags now */