Author: akhaldi
Date: Sun Jul 25 01:22:15 2010
New Revision: 48239
URL:
http://svn.reactos.org/svn/reactos?rev=48239&view=rev
Log:
[PSDK]
- Make FORCEINLINE extern (not static)
- Declare WspiapiLegacyFreeAddrInfo, WspiapiLegacyGetAddrInfo and WspiapiLegacyGetNameInfo
as static __inline.
[CRT]
- Convert FillBuf to static __inline.
[NTOS]
- Convert MmProtectToPteMask to extern.
- Convert LpcpAllocateFromPortZone to static __inline.
Modified:
trunk/reactos/include/psdk/ntdef.h
trunk/reactos/include/psdk/winnt.h
trunk/reactos/include/psdk/wspiapi.h
trunk/reactos/lib/sdk/crt/time/asctime.c
trunk/reactos/ntoskrnl/include/internal/lpc_x.h
trunk/reactos/ntoskrnl/mm/ARM3/miarm.h
trunk/reactos/ntoskrnl/mm/i386/page.c
Modified: trunk/reactos/include/psdk/ntdef.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/ntdef.h?rev=4…
==============================================================================
--- trunk/reactos/include/psdk/ntdef.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/ntdef.h [iso-8859-1] Sun Jul 25 01:22:15 2010
@@ -240,7 +240,7 @@
#elif (_MSC_VER)
#define FORCEINLINE __inline
#else
-#define FORCEINLINE static __inline__ __attribute__((always_inline))
+#define FORCEINLINE extern __inline__ __attribute__((always_inline))
#endif
#endif
Modified: trunk/reactos/include/psdk/winnt.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winnt.h?rev=4…
==============================================================================
--- trunk/reactos/include/psdk/winnt.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/winnt.h [iso-8859-1] Sun Jul 25 01:22:15 2010
@@ -79,7 +79,7 @@
#elif (_MSC_VER)
#define FORCEINLINE __inline
#else
-#define FORCEINLINE static __inline__ __attribute__((always_inline))
+#define FORCEINLINE extern __inline__ __attribute__((always_inline))
#endif
#endif
@@ -5112,7 +5112,7 @@
#endif
#if defined(_M_IX86)
-static __inline__ struct _TEB * NtCurrentTeb(void)
+extern __inline__ struct _TEB * NtCurrentTeb(void)
{
struct _TEB *ret;
@@ -5137,12 +5137,12 @@
return (struct _TEB *)__readgsqword(FIELD_OFFSET(NT_TIB, Self));
}
#elif defined(_M_PPC)
-static __inline__ struct _TEB * NtCurrentTeb(void)
+extern __inline__ struct _TEB * NtCurrentTeb(void)
{
return __readfsdword_winnt(0x18);
}
#else
-static __inline__ struct _TEB * NtCurrentTeb(void)
+extern __inline__ struct _TEB * NtCurrentTeb(void)
{
return __readfsdword_winnt(0x18);
}
Modified: trunk/reactos/include/psdk/wspiapi.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/wspiapi.h?rev…
==============================================================================
--- trunk/reactos/include/psdk/wspiapi.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/wspiapi.h [iso-8859-1] Sun Jul 25 01:22:15 2010
@@ -236,7 +236,7 @@
return 0;
}
-FORCEINLINE
+static __inline
void
WINAPI
WspiapiLegacyFreeAddrInfo(
@@ -252,7 +252,7 @@
}
}
-FORCEINLINE
+static __inline
int
WINAPI
WspiapiLegacyGetAddrInfo(
@@ -352,7 +352,7 @@
return (iError);
}
-FORCEINLINE
+static __inline
int
WINAPI
WspiapiLegacyGetNameInfo(
Modified: trunk/reactos/lib/sdk/crt/time/asctime.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/time/asctime.c…
==============================================================================
--- trunk/reactos/lib/sdk/crt/time/asctime.c [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/time/asctime.c [iso-8859-1] Sun Jul 25 01:22:15 2010
@@ -73,7 +73,7 @@
return u.char2;
}
-FORCEINLINE
+static __inline
void
FillBuf(timebuf_t *buf, const struct tm *ptm)
{
Modified: trunk/reactos/ntoskrnl/include/internal/lpc_x.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/lpc_x.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/lpc_x.h [iso-8859-1] Sun Jul 25 01:22:15 2010
@@ -95,7 +95,7 @@
//
// Allocates a new message
//
-FORCEINLINE
+static __inline
PLPCP_MESSAGE
LpcpAllocateFromPortZone(VOID)
{
Modified: trunk/reactos/ntoskrnl/mm/ARM3/miarm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/miarm.h?r…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/miarm.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/miarm.h [iso-8859-1] Sun Jul 25 01:22:15 2010
@@ -139,56 +139,9 @@
#else
#error Define these please!
#endif
-static const
-ULONG
-MmProtectToPteMask[32] =
-{
- //
- // These are the base MM_ protection flags
- //
- 0,
- PTE_READONLY | PTE_ENABLE_CACHE,
- PTE_EXECUTE | PTE_ENABLE_CACHE,
- PTE_EXECUTE_READ | PTE_ENABLE_CACHE,
- PTE_READWRITE | PTE_ENABLE_CACHE,
- PTE_WRITECOPY | PTE_ENABLE_CACHE,
- PTE_EXECUTE_READWRITE | PTE_ENABLE_CACHE,
- PTE_EXECUTE_WRITECOPY | PTE_ENABLE_CACHE,
- //
- // These OR in the MM_NOCACHE flag
- //
- 0,
- PTE_READONLY | PTE_DISABLE_CACHE,
- PTE_EXECUTE | PTE_DISABLE_CACHE,
- PTE_EXECUTE_READ | PTE_DISABLE_CACHE,
- PTE_READWRITE | PTE_DISABLE_CACHE,
- PTE_WRITECOPY | PTE_DISABLE_CACHE,
- PTE_EXECUTE_READWRITE | PTE_DISABLE_CACHE,
- PTE_EXECUTE_WRITECOPY | PTE_DISABLE_CACHE,
- //
- // These OR in the MM_DECOMMIT flag, which doesn't seem supported on x86/64/ARM
- //
- 0,
- PTE_READONLY | PTE_ENABLE_CACHE,
- PTE_EXECUTE | PTE_ENABLE_CACHE,
- PTE_EXECUTE_READ | PTE_ENABLE_CACHE,
- PTE_READWRITE | PTE_ENABLE_CACHE,
- PTE_WRITECOPY | PTE_ENABLE_CACHE,
- PTE_EXECUTE_READWRITE | PTE_ENABLE_CACHE,
- PTE_EXECUTE_WRITECOPY | PTE_ENABLE_CACHE,
- //
- // These OR in the MM_NOACCESS flag, which seems to enable WriteCombining?
- //
- 0,
- PTE_READONLY | PTE_WRITECOMBINED_CACHE,
- PTE_EXECUTE | PTE_WRITECOMBINED_CACHE,
- PTE_EXECUTE_READ | PTE_WRITECOMBINED_CACHE,
- PTE_READWRITE | PTE_WRITECOMBINED_CACHE,
- PTE_WRITECOPY | PTE_WRITECOMBINED_CACHE,
- PTE_EXECUTE_READWRITE | PTE_WRITECOMBINED_CACHE,
- PTE_EXECUTE_WRITECOPY | PTE_WRITECOMBINED_CACHE,
-};
-
+
+extern const ULONG MmProtectToPteMask[32];
+
//
// Assertions for session images, addresses, and PTEs
//
Modified: trunk/reactos/ntoskrnl/mm/i386/page.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/i386/page.c?re…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/i386/page.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/i386/page.c [iso-8859-1] Sun Jul 25 01:22:15 2010
@@ -12,6 +12,7 @@
#include <ntoskrnl.h>
#define NDEBUG
#include <debug.h>
+#include "../ARM3/miarm.h"
#if defined (ALLOC_PRAGMA)
#pragma alloc_text(INIT, MmInitGlobalKernelPageDirectory)
@@ -57,6 +58,56 @@
return dummy;
}
#endif
+
+const
+ULONG
+MmProtectToPteMask[32] =
+{
+ //
+ // These are the base MM_ protection flags
+ //
+ 0,
+ PTE_READONLY | PTE_ENABLE_CACHE,
+ PTE_EXECUTE | PTE_ENABLE_CACHE,
+ PTE_EXECUTE_READ | PTE_ENABLE_CACHE,
+ PTE_READWRITE | PTE_ENABLE_CACHE,
+ PTE_WRITECOPY | PTE_ENABLE_CACHE,
+ PTE_EXECUTE_READWRITE | PTE_ENABLE_CACHE,
+ PTE_EXECUTE_WRITECOPY | PTE_ENABLE_CACHE,
+ //
+ // These OR in the MM_NOCACHE flag
+ //
+ 0,
+ PTE_READONLY | PTE_DISABLE_CACHE,
+ PTE_EXECUTE | PTE_DISABLE_CACHE,
+ PTE_EXECUTE_READ | PTE_DISABLE_CACHE,
+ PTE_READWRITE | PTE_DISABLE_CACHE,
+ PTE_WRITECOPY | PTE_DISABLE_CACHE,
+ PTE_EXECUTE_READWRITE | PTE_DISABLE_CACHE,
+ PTE_EXECUTE_WRITECOPY | PTE_DISABLE_CACHE,
+ //
+ // These OR in the MM_DECOMMIT flag, which doesn't seem supported on x86/64/ARM
+ //
+ 0,
+ PTE_READONLY | PTE_ENABLE_CACHE,
+ PTE_EXECUTE | PTE_ENABLE_CACHE,
+ PTE_EXECUTE_READ | PTE_ENABLE_CACHE,
+ PTE_READWRITE | PTE_ENABLE_CACHE,
+ PTE_WRITECOPY | PTE_ENABLE_CACHE,
+ PTE_EXECUTE_READWRITE | PTE_ENABLE_CACHE,
+ PTE_EXECUTE_WRITECOPY | PTE_ENABLE_CACHE,
+ //
+ // These OR in the MM_NOACCESS flag, which seems to enable WriteCombining?
+ //
+ 0,
+ PTE_READONLY | PTE_WRITECOMBINED_CACHE,
+ PTE_EXECUTE | PTE_WRITECOMBINED_CACHE,
+ PTE_EXECUTE_READ | PTE_WRITECOMBINED_CACHE,
+ PTE_READWRITE | PTE_WRITECOMBINED_CACHE,
+ PTE_WRITECOPY | PTE_WRITECOMBINED_CACHE,
+ PTE_EXECUTE_READWRITE | PTE_WRITECOMBINED_CACHE,
+ PTE_EXECUTE_WRITECOPY | PTE_WRITECOMBINED_CACHE,
+};
/* FUNCTIONS ***************************************************************/