From db068d0cae8426824fdbb39295277ecdf59d06dd Mon Sep 17 00:00:00 2001 From: David Welch Date: Sun, 18 Apr 1999 21:13:11 +0000 Subject: [PATCH] Synched makefiles svn path=/trunk/; revision=400 --- reactos/makefile.dos | 13 +++++++------ reactos/ntoskrnl/mm/mm.c | 27 ++++++++++----------------- 2 files changed, 17 insertions(+), 23 deletions(-) diff --git a/reactos/makefile.dos b/reactos/makefile.dos index 7d1a083f01b..60713c6b8c7 100644 --- a/reactos/makefile.dos +++ b/reactos/makefile.dos @@ -6,6 +6,7 @@ # Select your host # #HOST = mingw32-linux +#HOST = djgpp-msdos HOST = mingw32-windows include rules.mak @@ -13,8 +14,8 @@ include rules.mak # # Required to run the system # -COMPONENTS = iface_native ntoskrnl -DLLS = ntdll kernel32 +COMPONENTS = iface_native ntoskrnl +DLLS = ntdll kernel32 crtdll #DLLS = crtdll mingw32 # @@ -30,14 +31,14 @@ LOADERS = dos # # Select the device drivers and filesystems you want -# -DEVICE_DRIVERS = blue ide keyboard mouse null parallel sdisk serial +# +DEVICE_DRIVERS = blue ide keyboard mouse null parallel serial # DEVICE_DRIVERS = beep event floppy ide_test sound test test1 FS_DRIVERS = minix vfat ext2 # FS_DRIVERS = template KERNEL_SERVICES = $(DEVICE_DRIVERS) $(FS_DRIVERS) - -APPS = args hello shell + +APPS = args hello shell test cat bench # APPS = cmd all: $(COMPONENTS) $(DLLS) $(LOADERS) $(KERNEL_SERVICES) $(APPS) diff --git a/reactos/ntoskrnl/mm/mm.c b/reactos/ntoskrnl/mm/mm.c index 7f0d3c4edf0..7c09180d5c3 100644 --- a/reactos/ntoskrnl/mm/mm.c +++ b/reactos/ntoskrnl/mm/mm.c @@ -108,13 +108,13 @@ void VirtualInit(boot_param* bp) MmInitSectionImplementation(); } -ULONG MmCommitedSectionHandleFault(MEMORY_AREA* MemoryArea, PVOID Address) +NTSTATUS MmCommitedSectionHandleFault(MEMORY_AREA* MemoryArea, PVOID Address) { MmSetPage(PsGetCurrentProcess(), Address, MemoryArea->Attributes, (ULONG)MmAllocPage()); - return(TRUE); + return(STATUS_SUCCESS); } NTSTATUS MmSectionHandleFault(MEMORY_AREA* MemoryArea, PVOID Address) @@ -160,7 +160,7 @@ asmlinkage int page_fault_handler(unsigned int cs, KPROCESSOR_MODE FaultMode; MEMORY_AREA* MemoryArea; KIRQL oldlvl; - ULONG stat; + NTSTATUS Status; /* * Get the address for the page fault @@ -184,7 +184,7 @@ asmlinkage int page_fault_handler(unsigned int cs, /* * Find the memory area for the faulting address */ - if (cr2>=KERNEL_BASE) + if (cr2 >= KERNEL_BASE) { /* * Check permissions @@ -211,34 +211,27 @@ asmlinkage int page_fault_handler(unsigned int cs, switch (MemoryArea->Type) { case MEMORY_AREA_SYSTEM: - stat = 0; + Status = STATUS_UNSUCCESSFUL; break; case MEMORY_AREA_SECTION_VIEW_COMMIT: - if (MmSectionHandleFault(MemoryArea, (PVOID)cr2)==STATUS_SUCCESS) - { - stat = 1; - } - else - { - stat = 0; - } + Status = MmSectionHandleFault(MemoryArea, (PVOID)cr2); break; case MEMORY_AREA_COMMIT: - stat = MmCommitedSectionHandleFault(MemoryArea,(PVOID)cr2); + Status = MmCommitedSectionHandleFault(MemoryArea,(PVOID)cr2); break; default: - stat = 0; + Status = STATUS_UNSUCCESSFUL; break; } DPRINT("Completed page fault handling\n"); - if (stat) + if (NT_SUCCESS(Status)) { KeLowerIrql(oldlvl); } - return(stat); + return(NT_SUCCESS(Status)); } BOOLEAN MmIsThisAnNtAsSystem(VOID)