Alexandre Julliard : kernel32: Define GetProcessHeap as an assembler function on i386.

Alexandre Julliard julliard at winehq.org
Fri May 7 09:41:15 CDT 2010


Module: wine
Branch: master
Commit: 18dbaadfc5389337168003a879229479f46710c9
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=18dbaadfc5389337168003a879229479f46710c9

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri May  7 14:07:45 2010 +0200

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 ead0778..4d36a1d 100644
--- a/dlls/kernel32/heap.c
+++ b/dlls/kernel32/heap.c
@@ -249,15 +249,6 @@ BOOL WINAPI HeapUnlock(
 
 
 /***********************************************************************
- *           GetProcessHeap    (KERNEL32.@)
- */
-HANDLE WINAPI GetProcessHeap(void)
-{
-    return NtCurrentTeb()->Peb->ProcessHeap;
-}
-
-
-/***********************************************************************
  *           GetProcessHeaps    (KERNEL32.@)
  */
 DWORD WINAPI GetProcessHeaps( DWORD count, HANDLE *heaps )
diff --git a/dlls/kernel32/thread.c b/dlls/kernel32/thread.c
index f6a2b0f..5130286 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__ */
 
 /*************************************************************************




More information about the wine-cvs mailing list