ntdll: Export RtlWow64Get/SetThreadContext() on all 64-bit platforms.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2021-05-18 10:24:28 +02:00
parent 8eda3fcc68
commit ee0b909f87
4 changed files with 22 additions and 22 deletions

View File

@ -1073,9 +1073,9 @@
@ stdcall -arch=win64 RtlWow64GetCpuAreaInfo(ptr long ptr) @ stdcall -arch=win64 RtlWow64GetCpuAreaInfo(ptr long ptr)
@ stdcall RtlWow64GetCurrentMachine() @ stdcall RtlWow64GetCurrentMachine()
@ stdcall RtlWow64GetProcessMachines(long ptr ptr) @ stdcall RtlWow64GetProcessMachines(long ptr ptr)
@ stdcall -arch=x86_64 RtlWow64GetThreadContext(long ptr) @ stdcall -arch=win64 RtlWow64GetThreadContext(long ptr)
@ stdcall RtlWow64IsWowGuestMachineSupported(long ptr) @ stdcall RtlWow64IsWowGuestMachineSupported(long ptr)
@ stdcall -arch=x86_64 RtlWow64SetThreadContext(long ptr) @ stdcall -arch=win64 RtlWow64SetThreadContext(long ptr)
@ stub RtlWriteMemoryStream @ stub RtlWriteMemoryStream
@ stdcall RtlWriteRegistryValue(long ptr ptr long ptr long) @ stdcall RtlWriteRegistryValue(long ptr ptr long ptr long)
@ stub RtlZeroHeap @ stub RtlZeroHeap

View File

@ -142,6 +142,24 @@ NTSTATUS WINAPI RtlWow64GetCpuAreaInfo( WOW64_CPURESERVED *cpu, ULONG reserved,
return STATUS_INVALID_PARAMETER; return STATUS_INVALID_PARAMETER;
} }
/******************************************************************************
* RtlWow64GetThreadContext (NTDLL.@)
*/
NTSTATUS WINAPI RtlWow64GetThreadContext( HANDLE handle, WOW64_CONTEXT *context )
{
return NtQueryInformationThread( handle, ThreadWow64Context, context, sizeof(*context), NULL );
}
/******************************************************************************
* RtlWow64SetThreadContext (NTDLL.@)
*/
NTSTATUS WINAPI RtlWow64SetThreadContext( HANDLE handle, const WOW64_CONTEXT *context )
{
return NtSetInformationThread( handle, ThreadWow64Context, context, sizeof(*context) );
}
#endif #endif
/********************************************************************** /**********************************************************************

View File

@ -343,24 +343,6 @@ __ASM_GLOBAL_FUNC( RtlCaptureContext,
"fxsave 0x100(%rcx)\n\t" /* context->FltSave */ "fxsave 0x100(%rcx)\n\t" /* context->FltSave */
"ret" ); "ret" );
/******************************************************************************
* RtlWow64GetThreadContext (NTDLL.@)
*/
NTSTATUS WINAPI RtlWow64GetThreadContext( HANDLE handle, WOW64_CONTEXT *context )
{
return NtQueryInformationThread( handle, ThreadWow64Context, context, sizeof(*context), NULL );
}
/******************************************************************************
* RtlWow64SetThreadContext (NTDLL.@)
*/
NTSTATUS WINAPI RtlWow64SetThreadContext( HANDLE handle, const WOW64_CONTEXT *context )
{
return NtSetInformationThread( handle, ThreadWow64Context, context, sizeof(*context) );
}
static DWORD __cdecl nested_exception_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame, static DWORD __cdecl nested_exception_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame,
CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **dispatcher ) CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **dispatcher )
{ {

View File

@ -1666,7 +1666,7 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class,
case ThreadWow64Context: case ThreadWow64Context:
{ {
#ifdef __x86_64__ #ifdef _WIN64
BOOL self; BOOL self;
WOW64_CONTEXT *context = data; WOW64_CONTEXT *context = data;
@ -1861,7 +1861,7 @@ NTSTATUS WINAPI NtSetInformationThread( HANDLE handle, THREADINFOCLASS class,
case ThreadWow64Context: case ThreadWow64Context:
{ {
#ifdef __x86_64__ #ifdef _WIN64
BOOL self; BOOL self;
const WOW64_CONTEXT *context = data; const WOW64_CONTEXT *context = data;