mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[NTOSKRNL] Handle the PIN_WAIT flag in CcPinMappedData()
This commit is contained in:
parent
469e15c7ae
commit
c1dd4c142f
1 changed files with 5 additions and 4 deletions
|
@ -161,6 +161,7 @@ CcPinMappedData (
|
|||
IN ULONG Flags,
|
||||
OUT PVOID * Bcb)
|
||||
{
|
||||
BOOLEAN Result;
|
||||
PINTERNAL_BCB iBcb;
|
||||
PROS_SHARED_CACHE_MAP SharedCacheMap;
|
||||
|
||||
|
@ -181,16 +182,16 @@ CcPinMappedData (
|
|||
iBcb->Pinned = TRUE;
|
||||
iBcb->Vacb->PinCount++;
|
||||
|
||||
if (Flags & PIN_EXCLUSIVE)
|
||||
if (BooleanFlagOn(Flags, PIN_EXCLUSIVE))
|
||||
{
|
||||
ExAcquireResourceExclusiveLite(&iBcb->Lock, TRUE);
|
||||
Result = ExAcquireResourceExclusiveLite(&iBcb->Lock, BooleanFlagOn(Flags, PIN_WAIT));
|
||||
}
|
||||
else
|
||||
{
|
||||
ExAcquireResourceSharedLite(&iBcb->Lock, TRUE);
|
||||
Result = ExAcquireResourceSharedLite(&iBcb->Lock, BooleanFlagOn(Flags, PIN_WAIT));
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return Result;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue