ntdll: Replaced get_cpu_context by RtlCaptureContext. Implemented it for x86_64.

This commit is contained in:
Alexandre Julliard 2009-01-06 17:50:34 +01:00
parent d1e8a85b1f
commit 14c452fe78
7 changed files with 14 additions and 39 deletions

View File

@ -400,25 +400,6 @@ NTSTATUS WINAPI NtRaiseException( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL
return status;
}
/***********************************************************************
* RtlCaptureContext (NTDLL.@)
*/
void WINAPI __regs_RtlCaptureContext( CONTEXT *context_out, CONTEXT *context_in )
{
*context_out = *context_in;
}
/**********************************************************************/
#ifdef DEFINE_REGS_ENTRYPOINT
DEFINE_REGS_ENTRYPOINT( RtlCaptureContext, 1 )
#else
void WINAPI RtlCaptureContext( CONTEXT *context_out )
{
memset( context_out, 0, sizeof(*context_out) );
}
#endif
/***********************************************************************
* RtlRaiseException (NTDLL.@)

View File

@ -41,7 +41,6 @@ struct drive_info
/* exceptions */
extern void wait_suspend( CONTEXT *context );
extern void WINAPI __regs_RtlRaiseException( PEXCEPTION_RECORD, PCONTEXT );
extern void get_cpu_context( CONTEXT *context );
extern void set_cpu_context( const CONTEXT *context );
/* debug helper */

View File

@ -886,17 +886,15 @@ static inline void restore_context( const CONTEXT *context, SIGCONTEXT *sigconte
/***********************************************************************
* get_cpu_context
*
* Register function to get the context of the current thread.
* RtlCaptureContext (NTDLL.@)
*/
void WINAPI __regs_get_cpu_context( CONTEXT *context, CONTEXT *regs )
void WINAPI __regs_RtlCaptureContext( CONTEXT *context, CONTEXT *regs )
{
*context = *regs;
if (fpux_support) save_fpux( context );
else save_fpu( context );
}
DEFINE_REGS_ENTRYPOINT( get_cpu_context, 1 )
DEFINE_REGS_ENTRYPOINT( RtlCaptureContext, 1 )
/***********************************************************************

View File

@ -268,13 +268,12 @@ static inline void restore_fpu( CONTEXT *context, const SIGCONTEXT *sigcontext )
/***********************************************************************
* get_cpu_context
*
* Get the context of the current thread.
* RtlCaptureContext (NTDLL.@)
*/
void get_cpu_context( CONTEXT *context )
void WINAPI RtlCaptureContext( CONTEXT *context )
{
FIXME("not implemented\n");
memset( context, 0, sizeof(*context) );
}

View File

@ -149,13 +149,12 @@ static void restore_fpu( CONTEXT *context, ucontext_t *ucontext )
/***********************************************************************
* get_cpu_context
*
* Get the context of the current thread.
* RtlCaptureContext (NTDLL.@)
*/
void get_cpu_context( CONTEXT *context )
void WINAPI RtlCaptureContext( CONTEXT *context )
{
FIXME("not implemented\n");
memset( context, 0, sizeof(*context) );
}

View File

@ -199,14 +199,13 @@ static void restore_context( const CONTEXT *context, SIGCONTEXT *sigcontext )
/***********************************************************************
* get_cpu_context
*
* Get the context of the current thread.
* RtlCaptureContext (NTDLL.@)
*/
void get_cpu_context( CONTEXT *context )
void WINAPI __regs_RtlCaptureContext( CONTEXT *context, CONTEXT *regs )
{
FIXME("not implemented\n");
*context = *regs;
}
DEFINE_REGS_ENTRYPOINT( RtlCaptureContext, 1 )
/***********************************************************************

View File

@ -1134,7 +1134,7 @@ NTSTATUS WINAPI NtGetContextThread( HANDLE handle, CONTEXT *context )
{
if (needed_flags)
{
get_cpu_context( &ctx );
RtlCaptureContext( &ctx );
copy_context( context, &ctx, ctx.ContextFlags & needed_flags );
}
#ifdef __i386__