Module: wine Branch: master Commit: 117fefa274fca045c9c1dc19fb2563d9e8261c25 URL: https://gitlab.winehq.org/wine/wine/-/commit/117fefa274fca045c9c1dc19fb2563d...
Author: Alexandre Julliard julliard@winehq.org Date: Fri Mar 22 13:08:50 2024 +0100
wow64: Use setjmp/longjmp from ntdll.
---
dlls/wow64/syscall.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/wow64/syscall.c b/dlls/wow64/syscall.c index a1c6fbaac5a..40eb5327934 100644 --- a/dlls/wow64/syscall.c +++ b/dlls/wow64/syscall.c @@ -19,6 +19,7 @@ */
#include <stdarg.h> +#include <setjmp.h>
#include "ntstatus.h" #define WIN32_NO_STATUS @@ -26,7 +27,7 @@ #include "winbase.h" #include "winnt.h" #include "winternl.h" -#include "wine/exception.h" +#include "rtlsupportapi.h" #include "wine/unixlib.h" #include "wine/asm.h" #include "wow64_private.h" @@ -77,7 +78,7 @@ struct user_callback_frame void **ret_ptr; ULONG *ret_len; NTSTATUS status; - __wine_jmp_buf jmpbuf; + jmp_buf jmpbuf; };
/* stack frame for user APCs */ @@ -114,8 +115,6 @@ NTSTATUS (WINAPI *pBTCpuResetToConsistentState)( EXCEPTION_POINTERS * ) = NULL; void (WINAPI *pBTCpuUpdateProcessorInformation)( SYSTEM_CPU_INFORMATION * ) = NULL; void (WINAPI *pBTCpuThreadTerm)( HANDLE ) = NULL;
-void *dummy = RtlUnwind; - BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, void *reserved ) { if (reason == DLL_PROCESS_ATTACH) LdrDisableThreadCalloutsForDll( inst ); @@ -465,7 +464,8 @@ NTSTATUS WINAPI wow64_NtCallbackReturn( UINT *args ) *frame->ret_ptr = ret_ptr; *frame->ret_len = ret_len; frame->status = status; - __wine_longjmp( &frame->jmpbuf, 1 ); + longjmp( frame->jmpbuf, 1 ); + return STATUS_SUCCESS; }
@@ -1232,7 +1232,7 @@ NTSTATUS WINAPI Wow64KiUserCallbackDispatcher( ULONG id, void *args, ULONG len, ctx.Eip = pLdrSystemDllInitBlock->pKiUserCallbackDispatcher; pBTCpuSetContext( GetCurrentThread(), GetCurrentProcess(), NULL, &ctx );
- if (!__wine_setjmpex( &frame.jmpbuf, NULL )) + if (!setjmp( frame.jmpbuf )) cpu_simulate(); else pBTCpuSetContext( GetCurrentThread(), GetCurrentProcess(), NULL, &orig_ctx ); @@ -1257,7 +1257,7 @@ NTSTATUS WINAPI Wow64KiUserCallbackDispatcher( ULONG id, void *args, ULONG len, ctx.Pc = pLdrSystemDllInitBlock->pKiUserCallbackDispatcher; pBTCpuSetContext( GetCurrentThread(), GetCurrentProcess(), NULL, &ctx );
- if (!__wine_setjmpex( &frame.jmpbuf, NULL )) + if (!setjmp( frame.jmpbuf )) cpu_simulate(); else pBTCpuSetContext( GetCurrentThread(), GetCurrentProcess(), NULL, &orig_ctx );