mirror of
https://github.com/reactos/reactos.git
synced 2025-06-05 01:10:26 +00:00
[NTOS:MM] Fix warnings when NEWCC is enabled
svn path=/trunk/; revision=65452
This commit is contained in:
parent
5d7ced37ec
commit
b89c9e939b
2 changed files with 20 additions and 13 deletions
|
@ -300,7 +300,9 @@ NTAPI
|
||||||
MmMpwThreadMain(PVOID Parameter)
|
MmMpwThreadMain(PVOID Parameter)
|
||||||
{
|
{
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
#ifndef NEWCC
|
||||||
ULONG PagesWritten;
|
ULONG PagesWritten;
|
||||||
|
#endif
|
||||||
LARGE_INTEGER Timeout;
|
LARGE_INTEGER Timeout;
|
||||||
|
|
||||||
UNREFERENCED_PARAMETER(Parameter);
|
UNREFERENCED_PARAMETER(Parameter);
|
||||||
|
@ -321,9 +323,9 @@ MmMpwThreadMain(PVOID Parameter)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NEWCC
|
||||||
PagesWritten = 0;
|
PagesWritten = 0;
|
||||||
|
|
||||||
#ifndef NEWCC
|
|
||||||
// XXX arty -- we flush when evicting pages or destorying cache
|
// XXX arty -- we flush when evicting pages or destorying cache
|
||||||
// sections.
|
// sections.
|
||||||
CcRosFlushDirtyPages(128, &PagesWritten, FALSE);
|
CcRosFlushDirtyPages(128, &PagesWritten, FALSE);
|
||||||
|
|
|
@ -904,17 +904,16 @@ MmUnsharePageEntrySectionSegment(PROS_SECTION_OBJECT Section,
|
||||||
if (SHARE_COUNT_FROM_SSE(Entry) == 0)
|
if (SHARE_COUNT_FROM_SSE(Entry) == 0)
|
||||||
{
|
{
|
||||||
PFILE_OBJECT FileObject;
|
PFILE_OBJECT FileObject;
|
||||||
#ifndef NEWCC
|
|
||||||
PROS_SHARED_CACHE_MAP SharedCacheMap;
|
|
||||||
#endif
|
|
||||||
SWAPENTRY SavedSwapEntry;
|
SWAPENTRY SavedSwapEntry;
|
||||||
PFN_NUMBER Page;
|
PFN_NUMBER Page;
|
||||||
|
#ifndef NEWCC
|
||||||
|
PROS_SHARED_CACHE_MAP SharedCacheMap;
|
||||||
BOOLEAN IsImageSection;
|
BOOLEAN IsImageSection;
|
||||||
LARGE_INTEGER FileOffset;
|
LARGE_INTEGER FileOffset;
|
||||||
|
|
||||||
FileOffset.QuadPart = Offset->QuadPart + Segment->Image.FileOffset;
|
FileOffset.QuadPart = Offset->QuadPart + Segment->Image.FileOffset;
|
||||||
|
|
||||||
IsImageSection = Section->AllocationAttributes & SEC_IMAGE ? TRUE : FALSE;
|
IsImageSection = Section->AllocationAttributes & SEC_IMAGE ? TRUE : FALSE;
|
||||||
|
#endif
|
||||||
|
|
||||||
Page = PFN_FROM_SSE(Entry);
|
Page = PFN_FROM_SSE(Entry);
|
||||||
FileObject = Section->FileObject;
|
FileObject = Section->FileObject;
|
||||||
|
@ -1873,14 +1872,14 @@ MmPageOutSectionView(PMMSUPPORT AddressSpace,
|
||||||
PFN_NUMBER Page;
|
PFN_NUMBER Page;
|
||||||
MM_SECTION_PAGEOUT_CONTEXT Context;
|
MM_SECTION_PAGEOUT_CONTEXT Context;
|
||||||
SWAPENTRY SwapEntry;
|
SWAPENTRY SwapEntry;
|
||||||
ULONGLONG FileOffset;
|
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
PFILE_OBJECT FileObject;
|
|
||||||
#ifndef NEWCC
|
#ifndef NEWCC
|
||||||
|
ULONGLONG FileOffset;
|
||||||
|
PFILE_OBJECT FileObject;
|
||||||
PROS_SHARED_CACHE_MAP SharedCacheMap = NULL;
|
PROS_SHARED_CACHE_MAP SharedCacheMap = NULL;
|
||||||
|
BOOLEAN IsImageSection;
|
||||||
#endif
|
#endif
|
||||||
BOOLEAN DirectMapped;
|
BOOLEAN DirectMapped;
|
||||||
BOOLEAN IsImageSection;
|
|
||||||
PEPROCESS Process = MmGetAddressSpaceOwner(AddressSpace);
|
PEPROCESS Process = MmGetAddressSpaceOwner(AddressSpace);
|
||||||
KIRQL OldIrql;
|
KIRQL OldIrql;
|
||||||
|
|
||||||
|
@ -1896,16 +1895,16 @@ MmPageOutSectionView(PMMSUPPORT AddressSpace,
|
||||||
|
|
||||||
Context.Offset.QuadPart = (ULONG_PTR)Address - (ULONG_PTR)MemoryArea->StartingAddress
|
Context.Offset.QuadPart = (ULONG_PTR)Address - (ULONG_PTR)MemoryArea->StartingAddress
|
||||||
+ MemoryArea->Data.SectionData.ViewOffset.QuadPart;
|
+ MemoryArea->Data.SectionData.ViewOffset.QuadPart;
|
||||||
FileOffset = Context.Offset.QuadPart + Context.Segment->Image.FileOffset;
|
|
||||||
|
|
||||||
IsImageSection = Context.Section->AllocationAttributes & SEC_IMAGE ? TRUE : FALSE;
|
|
||||||
|
|
||||||
FileObject = Context.Section->FileObject;
|
|
||||||
DirectMapped = FALSE;
|
DirectMapped = FALSE;
|
||||||
|
|
||||||
MmLockSectionSegment(Context.Segment);
|
MmLockSectionSegment(Context.Segment);
|
||||||
|
|
||||||
#ifndef NEWCC
|
#ifndef NEWCC
|
||||||
|
FileOffset = Context.Offset.QuadPart + Context.Segment->Image.FileOffset;
|
||||||
|
IsImageSection = Context.Section->AllocationAttributes & SEC_IMAGE ? TRUE : FALSE;
|
||||||
|
FileObject = Context.Section->FileObject;
|
||||||
|
|
||||||
if (FileObject != NULL &&
|
if (FileObject != NULL &&
|
||||||
!(Context.Segment->Image.Characteristics & IMAGE_SCN_MEM_SHARED))
|
!(Context.Segment->Image.Characteristics & IMAGE_SCN_MEM_SHARED))
|
||||||
{
|
{
|
||||||
|
@ -2284,7 +2283,9 @@ MmWritePageSectionView(PMMSUPPORT AddressSpace,
|
||||||
BOOLEAN Private;
|
BOOLEAN Private;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
PFILE_OBJECT FileObject;
|
PFILE_OBJECT FileObject;
|
||||||
|
#ifndef NEWCC
|
||||||
PROS_SHARED_CACHE_MAP SharedCacheMap = NULL;
|
PROS_SHARED_CACHE_MAP SharedCacheMap = NULL;
|
||||||
|
#endif
|
||||||
BOOLEAN DirectMapped;
|
BOOLEAN DirectMapped;
|
||||||
BOOLEAN IsImageSection;
|
BOOLEAN IsImageSection;
|
||||||
PEPROCESS Process = MmGetAddressSpaceOwner(AddressSpace);
|
PEPROCESS Process = MmGetAddressSpaceOwner(AddressSpace);
|
||||||
|
@ -2306,7 +2307,9 @@ MmWritePageSectionView(PMMSUPPORT AddressSpace,
|
||||||
if (FileObject != NULL &&
|
if (FileObject != NULL &&
|
||||||
!(Segment->Image.Characteristics & IMAGE_SCN_MEM_SHARED))
|
!(Segment->Image.Characteristics & IMAGE_SCN_MEM_SHARED))
|
||||||
{
|
{
|
||||||
|
#ifndef NEWCC
|
||||||
SharedCacheMap = FileObject->SectionObjectPointer->SharedCacheMap;
|
SharedCacheMap = FileObject->SectionObjectPointer->SharedCacheMap;
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If the file system is letting us go directly to the cache and the
|
* If the file system is letting us go directly to the cache and the
|
||||||
|
@ -3987,8 +3990,10 @@ MmFreeSectionPage(PVOID Context, MEMORY_AREA* MemoryArea, PVOID Address,
|
||||||
PFN_NUMBER Page, SWAPENTRY SwapEntry, BOOLEAN Dirty)
|
PFN_NUMBER Page, SWAPENTRY SwapEntry, BOOLEAN Dirty)
|
||||||
{
|
{
|
||||||
ULONG_PTR Entry;
|
ULONG_PTR Entry;
|
||||||
|
#ifndef NEWCC
|
||||||
PFILE_OBJECT FileObject;
|
PFILE_OBJECT FileObject;
|
||||||
PROS_SHARED_CACHE_MAP SharedCacheMap;
|
PROS_SHARED_CACHE_MAP SharedCacheMap;
|
||||||
|
#endif
|
||||||
LARGE_INTEGER Offset;
|
LARGE_INTEGER Offset;
|
||||||
SWAPENTRY SavedSwapEntry;
|
SWAPENTRY SavedSwapEntry;
|
||||||
PROS_SECTION_OBJECT Section;
|
PROS_SECTION_OBJECT Section;
|
||||||
|
@ -4028,9 +4033,9 @@ MmFreeSectionPage(PVOID Context, MEMORY_AREA* MemoryArea, PVOID Address,
|
||||||
{
|
{
|
||||||
if (Page == PFN_FROM_SSE(Entry) && Dirty)
|
if (Page == PFN_FROM_SSE(Entry) && Dirty)
|
||||||
{
|
{
|
||||||
|
#ifndef NEWCC
|
||||||
FileObject = MemoryArea->Data.SectionData.Section->FileObject;
|
FileObject = MemoryArea->Data.SectionData.Section->FileObject;
|
||||||
SharedCacheMap = FileObject->SectionObjectPointer->SharedCacheMap;
|
SharedCacheMap = FileObject->SectionObjectPointer->SharedCacheMap;
|
||||||
#ifndef NEWCC
|
|
||||||
CcRosMarkDirtyVacb(SharedCacheMap, Offset.QuadPart + Segment->Image.FileOffset);
|
CcRosMarkDirtyVacb(SharedCacheMap, Offset.QuadPart + Segment->Image.FileOffset);
|
||||||
#endif
|
#endif
|
||||||
ASSERT(SwapEntry == 0);
|
ASSERT(SwapEntry == 0);
|
||||||
|
|
Loading…
Reference in a new issue