Author: tkreuzer
Date: Fri Apr 8 12:30:33 2011
New Revision: 51278
URL:
http://svn.reactos.org/svn/reactos?rev=51278&view=rev
Log:
[NTOSKRNL]
ExInitializePushLock takes a PEX_PUSH_LOCK as parameter, do it the same in the inline
version instead of casting to PULONG_PTR everywhere
Modified:
trunk/reactos/ntoskrnl/cc/view.c
trunk/reactos/ntoskrnl/config/cminit.c
trunk/reactos/ntoskrnl/config/cmkcbncb.c
trunk/reactos/ntoskrnl/config/cmsysini.c
trunk/reactos/ntoskrnl/ex/handle.c
trunk/reactos/ntoskrnl/include/internal/ex.h
trunk/reactos/ntoskrnl/mm/ARM3/mminit.c
trunk/reactos/ntoskrnl/ob/obdir.c
trunk/reactos/ntoskrnl/ob/obsdcach.c
Modified: trunk/reactos/ntoskrnl/cc/view.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cc/view.c?rev=512…
==============================================================================
--- trunk/reactos/ntoskrnl/cc/view.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/cc/view.c [iso-8859-1] Fri Apr 8 12:30:33 2011
@@ -596,7 +596,7 @@
current->DirtySegmentListEntry.Flink = NULL;
current->DirtySegmentListEntry.Blink = NULL;
current->ReferenceCount = 1;
- ExInitializePushLock((PULONG_PTR)¤t->Lock);
+ ExInitializePushLock(¤t->Lock);
ExAcquirePushLockExclusive(¤t->Lock);
KeAcquireGuardedMutex(&ViewLock);
Modified: trunk/reactos/ntoskrnl/config/cminit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cminit.c?r…
==============================================================================
--- trunk/reactos/ntoskrnl/config/cminit.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/config/cminit.c [iso-8859-1] Fri Apr 8 12:30:33 2011
@@ -137,11 +137,11 @@
ExInitializeResourceLite(Hive->FlusherLock);
/* Setup hive locks */
- ExInitializePushLock((PULONG_PTR)&Hive->HiveLock);
+ ExInitializePushLock(&Hive->HiveLock);
Hive->HiveLockOwner = NULL;
- ExInitializePushLock((PULONG_PTR)&Hive->WriterLock);
+ ExInitializePushLock(&Hive->WriterLock);
Hive->WriterLockOwner = NULL;
- ExInitializePushLock((PULONG_PTR)&Hive->SecurityLock);
+ ExInitializePushLock(&Hive->SecurityLock);
Hive->HiveSecurityLockOwner = NULL;
/* Clear file names */
Modified: trunk/reactos/ntoskrnl/config/cmkcbncb.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmkcbncb.c…
==============================================================================
--- trunk/reactos/ntoskrnl/config/cmkcbncb.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/config/cmkcbncb.c [iso-8859-1] Fri Apr 8 12:30:33 2011
@@ -45,7 +45,7 @@
for (i = 0;i < CmpHashTableSize; i++)
{
/* Setup the pushlock */
- ExInitializePushLock((PULONG_PTR)&CmpCacheTable[i].Lock);
+ ExInitializePushLock(&CmpCacheTable[i].Lock);
}
/* Calculate length for the name cache */
@@ -66,7 +66,7 @@
for (i = 0;i < CmpHashTableSize; i++)
{
/* Setup the pushlock */
- ExInitializePushLock((PULONG_PTR)&CmpNameCacheTable[i].Lock);
+ ExInitializePushLock(&CmpNameCacheTable[i].Lock);
}
/* Setup the delayed close table */
@@ -1072,9 +1072,9 @@
if (Flags & CMP_ENLIST_KCB_LOCKED_SHARED)
{
/* It's shared, so release the KCB shared lock */
- CmpReleaseKcbLock(KeyBody->KeyControlBlock);
+ CmpReleaseKcbLock(KeyBody->KeyControlBlock);
ASSERT(!(Flags & CMP_ENLIST_KCB_LOCKED_EXCLUSIVE));
- }
+ }
/* Check if we need to lock the KCB */
if (!(Flags & CMP_ENLIST_KCB_LOCKED_EXCLUSIVE))
@@ -1097,7 +1097,7 @@
{
/* Release the lock */
CmpReleaseKcbLock(KeyBody->KeyControlBlock);
- }
+ }
}
VOID
@@ -1184,7 +1184,7 @@
ASSERT(KeyBody->NotifyBlock == NULL);
/* Release the reference we took */
- ObDereferenceObjectDeferDelete(KeyBody);
+ ObDereferenceObjectDeferDelete(KeyBody);
continue;
}
}
Modified: trunk/reactos/ntoskrnl/config/cmsysini.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmsysini.c…
==============================================================================
--- trunk/reactos/ntoskrnl/config/cmsysini.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/config/cmsysini.c [iso-8859-1] Fri Apr 8 12:30:33 2011
@@ -1393,8 +1393,8 @@
/* Initialize the hive list and lock */
InitializeListHead(&CmpHiveListHead);
- ExInitializePushLock((PVOID)&CmpHiveListHeadLock);
- ExInitializePushLock((PVOID)&CmpLoadHiveLock);
+ ExInitializePushLock(&CmpHiveListHeadLock);
+ ExInitializePushLock(&CmpLoadHiveLock);
/* Initialize registry lock */
ExInitializeResourceLite(&CmpRegistryLock);
@@ -1614,7 +1614,7 @@
if (DriverNode->ListEntry.RegistryPath.Buffer)
{
/* Free it */
- CmpFree(DriverNode->ListEntry.RegistryPath.Buffer,
+ CmpFree(DriverNode->ListEntry.RegistryPath.Buffer,
DriverNode->ListEntry.RegistryPath.MaximumLength);
}
Modified: trunk/reactos/ntoskrnl/ex/handle.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/handle.c?rev=5…
==============================================================================
--- trunk/reactos/ntoskrnl/ex/handle.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ex/handle.c [iso-8859-1] Fri Apr 8 12:30:33 2011
@@ -28,7 +28,7 @@
{
/* Initialize the list of handle tables and the lock */
InitializeListHead(&HandleTableListHead);
- ExInitializePushLock((PULONG_PTR)&HandleTableListLock);
+ ExInitializePushLock(&HandleTableListLock);
}
PHANDLE_TABLE_ENTRY
@@ -409,11 +409,11 @@
for (i = 0; i < 4; i++)
{
/* Initialize the handle table lock */
- ExInitializePushLock((PULONG_PTR)&HandleTable->HandleTableLock[i]);
+ ExInitializePushLock(&HandleTable->HandleTableLock[i]);
}
/* Initialize the contention event lock and return the lock */
- ExInitializePushLock((PULONG_PTR)&HandleTable->HandleContentionEvent);
+ ExInitializePushLock(&HandleTable->HandleContentionEvent);
return HandleTable;
}
Modified: trunk/reactos/ntoskrnl/include/internal/ex.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/ex.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/ex.h [iso-8859-1] Fri Apr 8 12:30:33 2011
@@ -887,10 +887,10 @@
*--*/
FORCEINLINE
VOID
-_ExInitializePushLock(IN PULONG_PTR PushLock)
+_ExInitializePushLock(OUT PEX_PUSH_LOCK PushLock)
{
/* Set the value to 0 */
- *PushLock = 0;
+ PushLock->Ptr = 0;
}
#define ExInitializePushLock _ExInitializePushLock
Modified: trunk/reactos/ntoskrnl/mm/ARM3/mminit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/mminit.c?…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/mminit.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/mminit.c [iso-8859-1] Fri Apr 8 12:30:33 2011
@@ -1993,7 +1993,7 @@
MmNumberOfSystemPtes, MmNumberOfSystemPtes * PAGE_SIZE);
/* Initialize the working set lock */
- ExInitializePushLock((PULONG_PTR)&MmSystemCacheWs.WorkingSetMutex);
+ ExInitializePushLock(&MmSystemCacheWs.WorkingSetMutex);
/* Set commit limit */
MmTotalCommitLimit = 2 * _1GB;
Modified: trunk/reactos/ntoskrnl/ob/obdir.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obdir.c?rev=51…
==============================================================================
--- trunk/reactos/ntoskrnl/ob/obdir.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ob/obdir.c [iso-8859-1] Fri Apr 8 12:30:33 2011
@@ -768,7 +768,7 @@
/* Setup the object */
RtlZeroMemory(Directory, sizeof(OBJECT_DIRECTORY));
- ExInitializePushLock((PULONG_PTR)&Directory->Lock);
+ ExInitializePushLock(&Directory->Lock);
Directory->SessionId = -1;
/* Insert it into the handle table */
Modified: trunk/reactos/ntoskrnl/ob/obsdcach.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obsdcach.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/ob/obsdcach.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ob/obsdcach.c [iso-8859-1] Fri Apr 8 12:30:33 2011
@@ -67,7 +67,7 @@
{
/* Initialize the lock and the list */
InitializeListHead(&ObsSecurityDescriptorCache[i].Head);
- ExInitializePushLock((PULONG_PTR)&ObsSecurityDescriptorCache[i].PushLock);
+ ExInitializePushLock(&ObsSecurityDescriptorCache[i].PushLock);
}
/* Return success */
@@ -419,7 +419,7 @@
{
/* Increment its reference count */
InterlockedExchangeAdd((PLONG)&SdHeader->RefCount, RefBias);
-
+
/* Release the lock */
ObpSdReleaseLockShared(CacheEntry);