mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
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:
parent
34954b16a4
commit
7c1492c712
3 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -520,6 +520,7 @@ MmInitializeProcessAddressSpace(IN PEPROCESS Process,
|
|||
BoundaryAddressMultiple.QuadPart = 0;
|
||||
|
||||
/* Initialize the Addresss Space */
|
||||
KeInitializeGuardedMutex(&Process->AddressCreationLock);
|
||||
MmInitializeAddressSpace(Process, ProcessAddressSpace);
|
||||
|
||||
/* Acquire the Lock */
|
||||
|
|
Loading…
Reference in a new issue