Author: tkreuzer
Date: Sat Nov 20 10:43:37 2010
New Revision: 49655
URL:
http://svn.reactos.org/svn/reactos?rev=49655&view=rev
Log:
[NTOSKRNL]
Use constants instead of a gcc extension
Modified:
branches/cmake-bringup/ntoskrnl/mm/ARM3/i386/init.c
branches/cmake-bringup/ntoskrnl/mm/ARM3/miarm.h
Modified: branches/cmake-bringup/ntoskrnl/mm/ARM3/i386/init.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/ntoskrnl/mm/ARM3/…
==============================================================================
--- branches/cmake-bringup/ntoskrnl/mm/ARM3/i386/init.c [iso-8859-1] (original)
+++ branches/cmake-bringup/ntoskrnl/mm/ARM3/i386/init.c [iso-8859-1] Sat Nov 20 10:43:37
2010
@@ -19,16 +19,17 @@
/* GLOBALS ********************************************************************/
/* Template PTE and PDE for a kernel page */
-MMPTE ValidKernelPde = {.u.Hard.Valid = 1, .u.Hard.Write = 1, .u.Hard.Dirty = 1,
.u.Hard.Accessed = 1};
-MMPTE ValidKernelPte = {.u.Hard.Valid = 1, .u.Hard.Write = 1, .u.Hard.Dirty = 1,
.u.Hard.Accessed = 1};
+MMPTE ValidKernelPde = {{PTE_VALID|PTE_READWRITE|PTE_DIRTY|PTE_ACCESSED}};
+MMPTE ValidKernelPte = {{PTE_VALID|PTE_READWRITE|PTE_DIRTY|PTE_ACCESSED}};
/* Template PDE for a demand-zero page */
-MMPDE DemandZeroPde = {.u.Long = (MM_READWRITE <<
MM_PTE_SOFTWARE_PROTECTION_BITS)};
-MMPTE DemandZeroPte = {.u.Long = (MM_READWRITE <<
MM_PTE_SOFTWARE_PROTECTION_BITS)};
+MMPDE DemandZeroPde = {{MM_READWRITE << MM_PTE_SOFTWARE_PROTECTION_BITS}};
+MMPTE DemandZeroPte = {{MM_READWRITE << MM_PTE_SOFTWARE_PROTECTION_BITS}};
/* Template PTE for prototype page */
-MMPTE PrototypePte = {.u.Long = (MM_READWRITE << MM_PTE_SOFTWARE_PROTECTION_BITS) |
PTE_PROTOTYPE | (MI_PTE_LOOKUP_NEEDED << PAGE_SHIFT)};
-
+MMPTE PrototypePte = {{(MM_READWRITE << MM_PTE_SOFTWARE_PROTECTION_BITS) |
+ PTE_PROTOTYPE | (MI_PTE_LOOKUP_NEEDED << PAGE_SHIFT)}};
+
/* PRIVATE FUNCTIONS **********************************************************/
VOID
Modified: branches/cmake-bringup/ntoskrnl/mm/ARM3/miarm.h
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/ntoskrnl/mm/ARM3/…
==============================================================================
--- branches/cmake-bringup/ntoskrnl/mm/ARM3/miarm.h [iso-8859-1] (original)
+++ branches/cmake-bringup/ntoskrnl/mm/ARM3/miarm.h [iso-8859-1] Sat Nov 20 10:43:37 2010
@@ -138,6 +138,14 @@
#define PTE_EXECUTE_READWRITE 0x0
#define PTE_EXECUTE_WRITECOPY 0x200
#define PTE_PROTOTYPE 0x400
+
+//
+// State Flags
+//
+#define PTE_VALID 0x1
+#define PTE_ACCESSED 0x20
+#define PTE_DIRTY 0x40
+
//
// Cache flags
//