Author: fireball
Date: Wed Jun 18 04:53:38 2008
New Revision: 34006
URL: http://svn.reactos.org/svn/reactos?rev=34006&view=rev
Log:
- Wake up a pushlock only if it wasn't waking already, not vice versa (was a typo in ExfAcquirePushLockExclusive, but was done correctly in ExfAcquirePushLockShared).
Modified:
trunk/reactos/ntoskrnl/ex/pushlock.c
Modified: trunk/reactos/ntoskrnl/ex/pushlock.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/pushlock.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/ex/pushlock.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ex/pushlock.c [iso-8859-1] Wed Jun 18 04:53:38 2008
@@ -514,7 +514,7 @@
PtrToUlong(WaitBlock);
/* Check if the pushlock was already waking */
- if (OldValue.Waking) NeedWake = TRUE;
+ if (!OldValue.Waking) NeedWake = TRUE;
}
else
{
Author: fireball
Date: Tue Jun 17 13:21:41 2008
New Revision: 34000
URL: http://svn.reactos.org/svn/reactos?rev=34000&view=rev
Log:
Daniel Zimmerman <netzimme(a)aim.com>
- Cosmetic fix: initialize pushlocks using a special macro, not by assigning 0 to its value.
See issue #3352 for more details.
Modified:
trunk/reactos/ntoskrnl/ex/handle.c
Modified: trunk/reactos/ntoskrnl/ex/handle.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/handle.c?rev=3…
==============================================================================
--- trunk/reactos/ntoskrnl/ex/handle.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ex/handle.c [iso-8859-1] Tue Jun 17 13:21:41 2008
@@ -405,10 +405,14 @@
HandleTable->Flags = 0;
/* Loop all the handle table locks */
- for (i = 0; i < 4; i++) HandleTable->HandleTableLock[i].Value = 0;
+ for (i = 0; i < 4; i++)
+ {
+ /* Initialize the handle table lock */
+ ExInitializePushLock((PULONG_PTR)&HandleTable->HandleTableLock[i]);
+ }
/* Initialize the contention event lock and return the lock */
- HandleTable->HandleContentionEvent.Value = 0;
+ ExInitializePushLock((PULONG_PTR)&HandleTable->HandleContentionEvent);
return HandleTable;
}