From 18dbaadfc5389337168003a879229479f46710c9 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 7 May 2010 14:07:45 +0200 Subject: [PATCH] kernel32: Define GetProcessHeap as an assembler function on i386. --- dlls/kernel32/heap.c | 9 --------- dlls/kernel32/thread.c | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/dlls/kernel32/heap.c b/dlls/kernel32/heap.c index ead0778683..4d36a1d4a2 100644 --- a/dlls/kernel32/heap.c +++ b/dlls/kernel32/heap.c @@ -248,15 +248,6 @@ BOOL WINAPI HeapUnlock( } -/*********************************************************************** - * GetProcessHeap (KERNEL32.@) - */ -HANDLE WINAPI GetProcessHeap(void) -{ - return NtCurrentTeb()->Peb->ProcessHeap; -} - - /*********************************************************************** * GetProcessHeaps (KERNEL32.@) */ diff --git a/dlls/kernel32/thread.c b/dlls/kernel32/thread.c index f6a2b0f2cc..51302860ec 100644 --- a/dlls/kernel32/thread.c +++ b/dlls/kernel32/thread.c @@ -596,6 +596,12 @@ __ASM_STDCALL_FUNC( GetCurrentProcessId, 0, ".byte 0x64\n\tmovl 0x20,%eax\n\tret /* DWORD WINAPI GetCurrentThreadId(void) */ __ASM_STDCALL_FUNC( GetCurrentThreadId, 0, ".byte 0x64\n\tmovl 0x24,%eax\n\tret" ) +/*********************************************************************** + * GetProcessHeap (KERNEL32.@) + */ +/* HANDLE WINAPI GetProcessHeap(void) */ +__ASM_STDCALL_FUNC( GetProcessHeap, 0, ".byte 0x64\n\tmovl 0x30,%eax\n\tmovl 0x18(%eax),%eax\n\tret"); + #else /* __i386__ */ /********************************************************************** @@ -650,6 +656,14 @@ DWORD WINAPI GetCurrentThreadId(void) return HandleToULong(NtCurrentTeb()->ClientId.UniqueThread); } +/*********************************************************************** + * GetProcessHeap (KERNEL32.@) + */ +HANDLE WINAPI GetProcessHeap(void) +{ + return NtCurrentTeb()->Peb->ProcessHeap; +} + #endif /* __i386__ */ /************************************************************************* -- 2.32.0.93.g670b81a890