From f4eee1c73128e16352efd08e1f8b35f55f570173 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 10 Apr 2009 13:14:05 +0200 Subject: [PATCH] ntdll: Move the RtlRaiseException implementation into the respective platform-specific files. --- dlls/ntdll/exception.c | 23 ----------------------- dlls/ntdll/signal_i386.c | 12 ++++++++++++ dlls/ntdll/signal_powerpc.c | 13 +++++++++++++ dlls/ntdll/signal_sparc.c | 14 +++++++++++++- dlls/ntdll/signal_x86_64.c | 11 +++++++++++ 5 files changed, 49 insertions(+), 24 deletions(-) diff --git a/dlls/ntdll/exception.c b/dlls/ntdll/exception.c index 757fe049fe8..04996f3035e 100644 --- a/dlls/ntdll/exception.c +++ b/dlls/ntdll/exception.c @@ -427,29 +427,6 @@ void raise_status( NTSTATUS status, EXCEPTION_RECORD *rec ) } -/*********************************************************************** - * RtlRaiseException (NTDLL.@) - */ -void WINAPI __regs_RtlRaiseException( EXCEPTION_RECORD *rec, CONTEXT *context ) -{ - NTSTATUS status = raise_exception( rec, context, TRUE ); - if (status != STATUS_SUCCESS) raise_status( status, rec ); -} - -/**********************************************************************/ - -#ifdef DEFINE_REGS_ENTRYPOINT -DEFINE_REGS_ENTRYPOINT( RtlRaiseException, 1 ) -#else -void WINAPI RtlRaiseException( EXCEPTION_RECORD *rec ) -{ - CONTEXT context; - RtlCaptureContext( &context ); - __regs_RtlRaiseException( rec, &context ); -} -#endif - - /******************************************************************* * RtlUnwind (NTDLL.@) */ diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c index 76807ca8b80..53e001286c0 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -2007,6 +2007,18 @@ void __wine_enter_vm86( CONTEXT *context ) } #endif /* __HAVE_VM86 */ + +/*********************************************************************** + * RtlRaiseException (NTDLL.@) + */ +void WINAPI __regs_RtlRaiseException( EXCEPTION_RECORD *rec, CONTEXT *context ) +{ + NTSTATUS status = raise_exception( rec, context, TRUE ); + if (status != STATUS_SUCCESS) raise_status( status, rec ); +} +DEFINE_REGS_ENTRYPOINT( RtlRaiseException, 1 ) + + /********************************************************************** * DbgBreakPoint (NTDLL.@) */ diff --git a/dlls/ntdll/signal_powerpc.c b/dlls/ntdll/signal_powerpc.c index 619124659db..518b1238ac7 100644 --- a/dlls/ntdll/signal_powerpc.c +++ b/dlls/ntdll/signal_powerpc.c @@ -1001,6 +1001,19 @@ void __wine_enter_vm86( CONTEXT *context ) MESSAGE("vm86 mode not supported on this platform\n"); } +/*********************************************************************** + * RtlRaiseException (NTDLL.@) + */ +void WINAPI RtlRaiseException( EXCEPTION_RECORD *rec ) +{ + CONTEXT context; + NTSTATUS status; + + RtlCaptureContext( &context ); + status = raise_exception( rec, &context, TRUE ); + if (status) raise_status( status, rec ); +} + /********************************************************************** * DbgBreakPoint (NTDLL.@) */ diff --git a/dlls/ntdll/signal_sparc.c b/dlls/ntdll/signal_sparc.c index 8029be37967..0f4808e641f 100644 --- a/dlls/ntdll/signal_sparc.c +++ b/dlls/ntdll/signal_sparc.c @@ -699,7 +699,6 @@ void signal_init_process(void) this is correct, because that is what x86 does, or it is harmful because it could obscure problems in user code */ asm("ta 6"); /* 6 == ST_FIX_ALIGN defined in sys/trap.h */ - signal_init_thread(); return; error: @@ -716,6 +715,19 @@ void __wine_enter_vm86( CONTEXT *context ) MESSAGE("vm86 mode not supported on this platform\n"); } +/*********************************************************************** + * RtlRaiseException (NTDLL.@) + */ +void WINAPI RtlRaiseException( EXCEPTION_RECORD *rec ) +{ + CONTEXT context; + NTSTATUS status; + + RtlCaptureContext( &context ); + status = raise_exception( rec, &context, TRUE ); + if (status) raise_status( status, rec ); +} + /********************************************************************** * DbgBreakPoint (NTDLL.@) */ diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c index 0f7f26ba600..3deb583def0 100644 --- a/dlls/ntdll/signal_x86_64.c +++ b/dlls/ntdll/signal_x86_64.c @@ -804,6 +804,17 @@ PVOID WINAPI RtlVirtualUnwind ( ULONG type, ULONG64 base, ULONG64 pc, } +/*********************************************************************** + * RtlRaiseException (NTDLL.@) + */ +void WINAPI __regs_RtlRaiseException( EXCEPTION_RECORD *rec, CONTEXT *context ) +{ + NTSTATUS status = raise_exception( rec, context, TRUE ); + if (status != STATUS_SUCCESS) raise_status( status, rec ); +} +DEFINE_REGS_ENTRYPOINT( RtlRaiseException, 1 ) + + /********************************************************************** * __wine_enter_vm86 (NTDLL.@) */