Author: ros-arm-bringup
Date: Tue Jun 23 10:32:11 2009
New Revision: 41572
URL: http://svn.reactos.org/svn/reactos?rev=41572&view=rev
Log:
- Do not zero out MC_SYSTEM pages if they are "early pages" either. This could cause issues on certain systems where mapping the PFN database required "early pages", and they were zeroed before hyperspace was ready.
- Add a new flag to MmGetContigousPages to specify if these pages should be zeroed or not. Allows the nonpaged pool pages not to get automatically zeroed when allocated (the NP pool allocator can do this by itself later). This allows initial nonpaged pool to be allocated before hyperspace is ready.
Modified:
trunk/reactos/ntoskrnl/include/internal/mm.h
trunk/reactos/ntoskrnl/mm/cont.c
trunk/reactos/ntoskrnl/mm/freelist.c
Modified: trunk/reactos/ntoskrnl/include/internal/mm.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] Tue Jun 23 10:32:11 2009
@@ -1125,7 +1125,8 @@
ULONG NumberOfBytes,
PHYSICAL_ADDRESS LowestAcceptableAddress,
PHYSICAL_ADDRESS HighestAcceptableAddress,
- PHYSICAL_ADDRESS BoundaryAddressMultiple
+ PHYSICAL_ADDRESS BoundaryAddressMultiple,
+ BOOLEAN ZeroPages
);
NTSTATUS
Modified: trunk/reactos/ntoskrnl/mm/cont.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/cont.c?rev=415…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/cont.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/cont.c [iso-8859-1] Tue Jun 23 10:32:11 2009
@@ -103,7 +103,8 @@
PBase = MmGetContinuousPages(NumberOfBytes,
LowestAcceptableAddress,
HighestAcceptableAddress,
- BoundaryAddressMultiple);
+ BoundaryAddressMultiple,
+ TRUE);
if (PBase == 0)
{
MmLockAddressSpace(MmGetKernelAddressSpace());
Modified: trunk/reactos/ntoskrnl/mm/freelist.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/freelist.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/freelist.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/freelist.c [iso-8859-1] Tue Jun 23 10:32:11 2009
@@ -138,7 +138,8 @@
MmGetContinuousPages(ULONG NumberOfBytes,
PHYSICAL_ADDRESS LowestAcceptableAddress,
PHYSICAL_ADDRESS HighestAcceptableAddress,
- PHYSICAL_ADDRESS BoundaryAddressMultiple)
+ PHYSICAL_ADDRESS BoundaryAddressMultiple,
+ BOOLEAN ZeroPages)
{
ULONG NrPages;
ULONG i, j;
@@ -222,7 +223,7 @@
{
if (MiGetPfnEntry(i)->Flags.Zero == 0)
{
- MiZeroPage(i);
+ if (ZeroPages) MiZeroPage(i);
}
else
{
@@ -727,7 +728,7 @@
/* Allocate an early page -- we'll account for it later */
KeReleaseQueuedSpinLock(LockQueuePfnLock, oldIrql);
PfnOffset = MmAllocEarlyPage();
- MiZeroPage(PfnOffset);
+ if (Consumer != MC_SYSTEM) MiZeroPage(PfnOffset);
return PfnOffset;
}
Author: hyperion
Date: Tue Jun 23 00:29:48 2009
New Revision: 41565
URL: http://svn.reactos.org/svn/reactos?rev=41565&view=rev
Log:
Change <wine/list.h> to use the magic attribute salad for inline functions in headers
Modified:
trunk/reactos/include/reactos/wine/list.h
Modified: trunk/reactos/include/reactos/wine/list.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/list.…
==============================================================================
--- trunk/reactos/include/reactos/wine/list.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/wine/list.h [iso-8859-1] Tue Jun 23 00:29:48 2009
@@ -20,6 +20,18 @@
#ifndef __WINE_SERVER_LIST_H
#define __WINE_SERVER_LIST_H
+
+#ifdef __cplusplus
+#define __WINE_SERVER_LIST_INLINE inline
+#else
+#if defined(__GNUC__)
+#define __WINE_SERVER_LIST_INLINE extern __inline__ __attribute__((__always_inline__,__gnu_inline__))
+#elif defined(_MSC_VER)
+#define __WINE_SERVER_LIST_INLINE __inline
+#else
+#define __WINE_SERVER_LIST_INLINE static
+#endif
+#endif
struct list
{
@@ -63,7 +75,7 @@
*/
/* add an element after the specified one */
-static inline void list_add_after( struct list *elem, struct list *to_add )
+__WINE_SERVER_LIST_INLINE void list_add_after( struct list *elem, struct list *to_add )
{
to_add->next = elem->next;
to_add->prev = elem;
@@ -72,7 +84,7 @@
}
/* add an element before the specified one */
-static inline void list_add_before( struct list *elem, struct list *to_add )
+__WINE_SERVER_LIST_INLINE void list_add_before( struct list *elem, struct list *to_add )
{
to_add->next = elem;
to_add->prev = elem->prev;
@@ -81,26 +93,26 @@
}
/* add element at the head of the list */
-static inline void list_add_head( struct list *list, struct list *elem )
+__WINE_SERVER_LIST_INLINE void list_add_head( struct list *list, struct list *elem )
{
list_add_after( list, elem );
}
/* add element at the tail of the list */
-static inline void list_add_tail( struct list *list, struct list *elem )
+__WINE_SERVER_LIST_INLINE void list_add_tail( struct list *list, struct list *elem )
{
list_add_before( list, elem );
}
/* remove an element from its list */
-static inline void list_remove( struct list *elem )
+__WINE_SERVER_LIST_INLINE void list_remove( struct list *elem )
{
elem->next->prev = elem->prev;
elem->prev->next = elem->next;
}
/* get the next element */
-static inline struct list *list_next( const struct list *list, const struct list *elem )
+__WINE_SERVER_LIST_INLINE struct list *list_next( const struct list *list, const struct list *elem )
{
struct list *ret = elem->next;
if (elem->next == list) ret = NULL;
@@ -108,7 +120,7 @@
}
/* get the previous element */
-static inline struct list *list_prev( const struct list *list, const struct list *elem )
+__WINE_SERVER_LIST_INLINE struct list *list_prev( const struct list *list, const struct list *elem )
{
struct list *ret = elem->prev;
if (elem->prev == list) ret = NULL;
@@ -116,31 +128,31 @@
}
/* get the first element */
-static inline struct list *list_head( const struct list *list )
+__WINE_SERVER_LIST_INLINE struct list *list_head( const struct list *list )
{
return list_next( list, list );
}
/* get the last element */
-static inline struct list *list_tail( const struct list *list )
+__WINE_SERVER_LIST_INLINE struct list *list_tail( const struct list *list )
{
return list_prev( list, list );
}
/* check if a list is empty */
-static inline int list_empty( const struct list *list )
+__WINE_SERVER_LIST_INLINE int list_empty( const struct list *list )
{
return list->next == list;
}
/* initialize a list */
-static inline void list_init( struct list *list )
+__WINE_SERVER_LIST_INLINE void list_init( struct list *list )
{
list->next = list->prev = list;
}
/* count the elements of a list */
-static inline unsigned int list_count( const struct list *list )
+__WINE_SERVER_LIST_INLINE unsigned int list_count( const struct list *list )
{
unsigned count = 0;
const struct list *ptr;
@@ -149,7 +161,7 @@
}
/* move all elements from src to the tail of dst */
-static inline void list_move_tail( struct list *dst, struct list *src )
+__WINE_SERVER_LIST_INLINE void list_move_tail( struct list *dst, struct list *src )
{
if (list_empty(src)) return;
@@ -161,7 +173,7 @@
}
/* move all elements from src to the head of dst */
-static inline void list_move_head( struct list *dst, struct list *src )
+__WINE_SERVER_LIST_INLINE void list_move_head( struct list *dst, struct list *src )
{
if (list_empty(src)) return;