Author: tkreuzer Date: Wed Apr 14 17:15:50 2010 New Revision: 46868
URL: http://svn.reactos.org/svn/reactos?rev=46868&view=rev Log: [KERNEL32] - ULONG -> ULONG_PTR / SIZE_T - cast -> HandleToUlong - remove leading underscore from amd64 asm
Modified: branches/ros-amd64-bringup/reactos/dll/win32/kernel32/include/kernel32.h branches/ros-amd64-bringup/reactos/dll/win32/kernel32/misc/utils.c branches/ros-amd64-bringup/reactos/dll/win32/kernel32/process/proc.c branches/ros-amd64-bringup/reactos/dll/win32/kernel32/thread/amd64/fiber.S branches/ros-amd64-bringup/reactos/dll/win32/kernel32/thread/amd64/thread.S branches/ros-amd64-bringup/reactos/dll/win32/kernel32/thread/thread.c
Modified: branches/ros-amd64-bringup/reactos/dll/win32/kernel32/include/kernel32.h URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/wi... ============================================================================== --- branches/ros-amd64-bringup/reactos/dll/win32/kernel32/include/kernel32.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/dll/win32/kernel32/include/kernel32.h [iso-8859-1] Wed Apr 14 17:15:50 2010 @@ -31,7 +31,7 @@ #endif
#define IsConsoleHandle(h) \ - (((((ULONG)h) & 0x10000003) == 0x3) ? TRUE : FALSE) + (((((ULONG_PTR)h) & 0x10000003) == 0x3) ? TRUE : FALSE)
#define HANDLE_DETACHED_PROCESS (HANDLE)-2 #define HANDLE_CREATE_NEW_CONSOLE (HANDLE)-3 @@ -108,8 +108,8 @@ NTSTATUS WINAPI BasepCreateStack(HANDLE hProcess, - ULONG StackReserve, - ULONG StackCommit, + SIZE_T StackReserve, + SIZE_T StackCommit, PINITIAL_TEB InitialTeb);
VOID
Modified: branches/ros-amd64-bringup/reactos/dll/win32/kernel32/misc/utils.c URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/wi... ============================================================================== --- branches/ros-amd64-bringup/reactos/dll/win32/kernel32/misc/utils.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/dll/win32/kernel32/misc/utils.c [iso-8859-1] Wed Apr 14 17:15:50 2010 @@ -191,8 +191,8 @@ NTSTATUS WINAPI BasepCreateStack(HANDLE hProcess, - ULONG StackReserve, - ULONG StackCommit, + SIZE_T StackReserve, + SIZE_T StackCommit, PINITIAL_TEB InitialTeb) { NTSTATUS Status; @@ -292,7 +292,7 @@ /* Create a guard page */ if (UseGuard) { - ULONG GuardPageSize = SystemBasicInfo.PageSize; + SIZE_T GuardPageSize = SystemBasicInfo.PageSize; ULONG Dummy;
/* Attempt maximum space possible */ @@ -388,12 +388,12 @@ /* The other registers are undefined */
/* Setup the Segments */ - Context->SegGs = KGDT_64_DATA | RPL_MASK; - Context->SegEs = KGDT_64_DATA | RPL_MASK; - Context->SegDs = KGDT_64_DATA | RPL_MASK; - Context->SegCs = KGDT_64_R3_CODE | RPL_MASK; - Context->SegSs = KGDT_64_DATA | RPL_MASK; - Context->SegFs = KGDT_32_R3_TEB; + Context->SegGs = KGDT64_R3_DATA | RPL_MASK; + Context->SegEs = KGDT64_R3_DATA | RPL_MASK; + Context->SegDs = KGDT64_R3_DATA | RPL_MASK; + Context->SegCs = KGDT64_R3_CODE | RPL_MASK; + Context->SegSs = KGDT64_R3_DATA | RPL_MASK; + Context->SegFs = KGDT64_R3_CMTEB;
/* Set the EFLAGS */ Context->EFlags = 0x3000; /* IOPL 3 */
Modified: branches/ros-amd64-bringup/reactos/dll/win32/kernel32/process/proc.c URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/wi... ============================================================================== --- branches/ros-amd64-bringup/reactos/dll/win32/kernel32/process/proc.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/dll/win32/kernel32/process/proc.c [iso-8859-1] Wed Apr 14 17:15:50 2010 @@ -284,7 +284,7 @@ WINAPI GetCurrentProcessId(VOID) { - return (DWORD)GetTeb()->ClientId.UniqueProcess; + return HandleToUlong(GetTeb()->ClientId.UniqueProcess); }
@@ -355,7 +355,7 @@ OBJECT_ATTRIBUTES ObjectAttributes; CLIENT_ID ClientId;
- ClientId.UniqueProcess = (HANDLE)dwProcessId; + ClientId.UniqueProcess = UlongToHandle(dwProcessId); ClientId.UniqueThread = 0;
InitializeObjectAttributes(&ObjectAttributes, @@ -559,7 +559,7 @@ WINAPI FlushInstructionCache(HANDLE hProcess, LPCVOID lpBaseAddress, - DWORD dwSize) + SIZE_T dwSize) { NTSTATUS Status;
Modified: branches/ros-amd64-bringup/reactos/dll/win32/kernel32/thread/amd64/fiber.S URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/wi... ============================================================================== --- branches/ros-amd64-bringup/reactos/dll/win32/kernel32/thread/amd64/fiber.S [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/dll/win32/kernel32/thread/amd64/fiber.S [iso-8859-1] Wed Apr 14 17:15:50 2010 @@ -9,9 +9,9 @@
#include <ndk/asm.h>
-.globl _SwitchToFiber +.globl SwitchToFiber .intel_syntax noprefix
-_SwitchToFiber: +SwitchToFiber: /* FIXME: TODO */ ret 4
Modified: branches/ros-amd64-bringup/reactos/dll/win32/kernel32/thread/amd64/thread.S URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/wi... ============================================================================== --- branches/ros-amd64-bringup/reactos/dll/win32/kernel32/thread/amd64/thread.S [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/dll/win32/kernel32/thread/amd64/thread.S [iso-8859-1] Wed Apr 14 17:15:50 2010 @@ -6,11 +6,11 @@ * PROGRAMMER: Alex Ionescu (alex@relsoft.net) */
-.globl _BaseThreadStartupThunk -.globl _BaseProcessStartThunk +.globl BaseThreadStartupThunk +.globl BaseProcessStartThunk .intel_syntax noprefix
-_BaseThreadStartupThunk: +BaseThreadStartupThunk:
/* Start out fresh */ xor rbp, rbp @@ -18,15 +18,15 @@ push rbx /* lpParameter */ push rax /* lpStartAddress */ push 0 /* Return RIP */ - jmp _BaseThreadStartup + jmp BaseThreadStartup
-_BaseProcessStartThunk: +BaseProcessStartThunk:
/* Start out fresh */ xor rbp, rbp
push rax /* lpStartAddress */ push 0 /* Return RIP */ - jmp _BaseProcessStartup + jmp BaseProcessStartup
/* EOF */
Modified: branches/ros-amd64-bringup/reactos/dll/win32/kernel32/thread/thread.c URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/wi... ============================================================================== --- branches/ros-amd64-bringup/reactos/dll/win32/kernel32/thread/thread.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/dll/win32/kernel32/thread/thread.c [iso-8859-1] Wed Apr 14 17:15:50 2010 @@ -232,7 +232,7 @@ }
/* Success */ - if(lpThreadId) *lpThreadId = (DWORD)ClientId.UniqueThread; + if(lpThreadId) *lpThreadId = HandleToUlong(ClientId.UniqueThread);
/* Resume it if asked */ if (!(dwCreationFlags & CREATE_SUSPENDED)) @@ -344,7 +344,7 @@ WINAPI GetCurrentThreadId(VOID) { - return (DWORD)(NtCurrentTeb()->ClientId).UniqueThread; + return HandleToUlong(NtCurrentTeb()->ClientId.UniqueThread); }
/* @@ -754,7 +754,7 @@ return 0; }
- return (DWORD)ThreadBasic.ClientId.UniqueProcess; + return HandleToUlong(ThreadBasic.ClientId.UniqueProcess); }
/* @@ -777,7 +777,7 @@ return 0; }
- return (DWORD)ThreadBasic.ClientId.UniqueThread; + return HandleToUlong(ThreadBasic.ClientId.UniqueThread); }
/*