Author: tkreuzer
Date: Wed Jul 30 19:35:26 2008
New Revision: 34969
URL:
http://svn.reactos.org/svn/reactos?rev=34969&view=rev
Log:
- some ULONG / SIZE_T fixes
- handle amd64 in PspCreateThread
Modified:
branches/ros-amd64-bringup/reactos/include/ndk/exfuncs.h
branches/ros-amd64-bringup/reactos/ntoskrnl/ex/lookas.c
branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/ke.h
branches/ros-amd64-bringup/reactos/ntoskrnl/io/iomgr/error.c
branches/ros-amd64-bringup/reactos/ntoskrnl/io/iomgr/util.c
branches/ros-amd64-bringup/reactos/ntoskrnl/ps/thread.c
Modified: branches/ros-amd64-bringup/reactos/include/ndk/exfuncs.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
==============================================================================
--- branches/ros-amd64-bringup/reactos/include/ndk/exfuncs.h [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/include/ndk/exfuncs.h [iso-8859-1] Wed Jul 30
19:35:26 2008
@@ -390,8 +390,8 @@
NtQuerySystemInformation(
IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
OUT PVOID SystemInformation,
- IN SIZE_T Length,
- OUT PSIZE_T ResultLength
+ IN ULONG Length,
+ OUT PULONG ResultLength
);
NTSYSCALLAPI
@@ -539,7 +539,7 @@
NtSetSystemInformation(
IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
IN PVOID SystemInformation,
- IN SIZE_T SystemInformationLength
+ IN ULONG SystemInformationLength
);
NTSYSCALLAPI
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ex/lookas.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/ex/lookas.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/ex/lookas.c [iso-8859-1] Wed Jul 30
19:35:26 2008
@@ -222,7 +222,7 @@
IN PALLOCATE_FUNCTION Allocate OPTIONAL,
IN PFREE_FUNCTION Free OPTIONAL,
IN ULONG Flags,
- IN ULONG Size,
+ IN SIZE_T Size,
IN ULONG Tag,
IN USHORT Depth)
{
@@ -274,7 +274,7 @@
IN PALLOCATE_FUNCTION Allocate OPTIONAL,
IN PFREE_FUNCTION Free OPTIONAL,
IN ULONG Flags,
- IN ULONG Size,
+ IN SIZE_T Size,
IN ULONG Tag,
IN USHORT Depth)
{
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/ke.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/ke.h [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/ke.h [iso-8859-1] Wed Jul
30 19:35:26 2008
@@ -742,10 +742,10 @@
NTAPI
KeBugCheckWithTf(
ULONG BugCheckCode,
- ULONG BugCheckParameter1,
- ULONG BugCheckParameter2,
- ULONG BugCheckParameter3,
- ULONG BugCheckParameter4,
+ ULONG_PTR BugCheckParameter1,
+ ULONG_PTR BugCheckParameter2,
+ ULONG_PTR BugCheckParameter3,
+ ULONG_PTR BugCheckParameter4,
PKTRAP_FRAME Tf
);
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/io/iomgr/error.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/io/iomgr/error.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/io/iomgr/error.c [iso-8859-1] Wed Jul 30
19:35:26 2008
@@ -214,10 +214,10 @@
}
/* Align the buffer */
- StringBuffer = (PVOID)ALIGN_UP(StringBuffer, WCHAR);
+ StringBuffer = ALIGN_UP_POINTER(StringBuffer, WCHAR);
/* Set the offset for the driver's name to the current buffer */
- ErrorMessage->DriverNameOffset = (ULONG)(StringBuffer -
+ ErrorMessage->DriverNameOffset = (ULONG_PTR)(StringBuffer -
(ULONG_PTR)ErrorMessage);
/* Check how much space we have left for the device string */
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/io/iomgr/util.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/io/iomgr/util.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/io/iomgr/util.c [iso-8859-1] Wed Jul 30
19:35:26 2008
@@ -50,8 +50,8 @@
*/
VOID
NTAPI
-IoGetStackLimits(OUT PULONG LowLimit,
- OUT PULONG HighLimit)
+IoGetStackLimits(OUT PULONG_PTR LowLimit,
+ OUT PULONG_PTR HighLimit)
{
PKPRCB Prcb = KeGetCurrentPrcb();
ULONG_PTR DpcStack = (ULONG_PTR)(Prcb->DpcStack);
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ps/thread.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/ps/thread.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/ps/thread.c [iso-8859-1] Wed Jul 30
19:35:26 2008
@@ -104,7 +104,7 @@
Prcb = KeGetCurrentPrcb();
NewCookie = Prcb->MmPageFaultCount ^ Prcb->InterruptTime ^
SystemTime.u.LowPart ^ SystemTime.u.HighPart ^
- (ULONG)&SystemTime;
+ (ULONG_PTR)&SystemTime;
/* Set the new cookie*/
InterlockedCompareExchange((LONG*)&SharedUserData->Cookie,
@@ -333,6 +333,9 @@
#elif defined(_M_ARM)
Thread->StartAddress = (PVOID)ThreadContext->Pc;
Thread->Win32StartAddress = (PVOID)ThreadContext->R0;
+#elif defined(_M_AMD64)
+ Thread->StartAddress = (PVOID)ThreadContext->Rip;
+ Thread->Win32StartAddress = (PVOID)ThreadContext->Rax;
#else
#error Unknown architecture
#endif