The address space creation lock is a guarded mutex, not a pushlock, in NT 5.2. While it is commendable to attempt using Vista optimizations (it is a push lock on Vista) in order to speed up

the kernel, it is entirely stupid to do so by completing ignoring the ramifications of this change, and furthermore, to pollute the kernel with typecasts, as well as to introduce non-standard
behavior. Ironically it is ion himself who made this change.

svn path=/trunk/; revision=34879
This commit is contained in:
ReactOS Portable Systems Group 2008-07-28 01:11:19 +00:00
parent 34954b16a4
commit 7c1492c712
3 changed files with 4 additions and 4 deletions

View file

@ -1574,16 +1574,14 @@ FORCEINLINE
VOID
MmLockAddressSpace(PMADDRESS_SPACE AddressSpace)
{
KeEnterCriticalRegion();
ExAcquirePushLockExclusive((PEX_PUSH_LOCK)&CONTAINING_RECORD(AddressSpace, EPROCESS, VadRoot)->AddressCreationLock);
KeAcquireGuardedMutex(&CONTAINING_RECORD(AddressSpace, EPROCESS, VadRoot)->AddressCreationLock);
}
FORCEINLINE
VOID
MmUnlockAddressSpace(PMADDRESS_SPACE AddressSpace)
{
ExReleasePushLock((PEX_PUSH_LOCK)&CONTAINING_RECORD(AddressSpace, EPROCESS, VadRoot)->AddressCreationLock);
KeLeaveCriticalRegion();
KeReleaseGuardedMutex(&CONTAINING_RECORD(AddressSpace, EPROCESS, VadRoot)->AddressCreationLock);
}
FORCEINLINE

View file

@ -196,6 +196,7 @@ MmInitializeHandBuiltProcess(IN PEPROCESS Process,
*DirectoryTableBase = PsGetCurrentProcess()->Pcb.DirectoryTableBase;
/* Initialize the Addresss Space */
KeInitializeGuardedMutex(&Process->AddressCreationLock);
MmInitializeAddressSpace(Process, (PMADDRESS_SPACE)&Process->VadRoot);
/* The process now has an address space */

View file

@ -520,6 +520,7 @@ MmInitializeProcessAddressSpace(IN PEPROCESS Process,
BoundaryAddressMultiple.QuadPart = 0;
/* Initialize the Addresss Space */
KeInitializeGuardedMutex(&Process->AddressCreationLock);
MmInitializeAddressSpace(Process, ProcessAddressSpace);
/* Acquire the Lock */