projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
a1bc42e
)
[HAL]
author
Timo Kreuzer
<timo.kreuzer@reactos.org>
Fri, 1 Jan 2010 12:17:24 +0000
(12:17 +0000)
committer
Timo Kreuzer
<timo.kreuzer@reactos.org>
Fri, 1 Jan 2010 12:17:24 +0000
(12:17 +0000)
Don't spin with an interlocked operation.
svn path=/branches/ros-amd64-bringup/; revision=44849
reactos/hal/halx86/generic/cmos.c
patch
|
blob
|
history
diff --git
a/reactos/hal/halx86/generic/cmos.c
b/reactos/hal/halx86/generic/cmos.c
index
de5c443
..
abcf18f
100644
(file)
--- 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 */