Commit 17716bc7 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Implement RtlWow64GetCurrentCpuArea().

parent c9d23a15
......@@ -1075,6 +1075,7 @@
@ stdcall RtlWow64EnableFsRedirection(long)
@ stdcall RtlWow64EnableFsRedirectionEx(long ptr)
@ stdcall -arch=win64 RtlWow64GetCpuAreaInfo(ptr long ptr)
@ stdcall -arch=win64 RtlWow64GetCurrentCpuArea(ptr ptr ptr)
@ stdcall RtlWow64GetCurrentMachine()
@ stdcall RtlWow64GetProcessMachines(long ptr ptr)
@ stdcall -arch=win64 RtlWow64GetThreadContext(long ptr)
......
......@@ -143,6 +143,24 @@ NTSTATUS WINAPI RtlWow64GetCpuAreaInfo( WOW64_CPURESERVED *cpu, ULONG reserved,
}
/**********************************************************************
* RtlWow64GetCurrentCpuArea (NTDLL.@)
*/
NTSTATUS WINAPI RtlWow64GetCurrentCpuArea( USHORT *machine, void **context, void **context_ex )
{
WOW64_CPU_AREA_INFO info;
NTSTATUS status;
if (!(status = RtlWow64GetCpuAreaInfo( NtCurrentTeb()->TlsSlots[WOW64_TLS_CPURESERVED], 0, &info )))
{
if (machine) *machine = info.Machine;
if (context) *context = info.Context;
if (context_ex) *context_ex = *(void **)info.ContextEx;
}
return status;
}
/******************************************************************************
* RtlWow64GetThreadContext (NTDLL.@)
*/
......
......@@ -4404,6 +4404,7 @@ NTSYSAPI int __cdecl _strnicmp(LPCSTR,LPCSTR,size_t);
#ifdef _WIN64
NTSYSAPI NTSTATUS WINAPI RtlWow64GetCpuAreaInfo(WOW64_CPURESERVED*,ULONG,WOW64_CPU_AREA_INFO*);
NTSYSAPI NTSTATUS WINAPI RtlWow64GetCurrentCpuArea(USHORT*,void**,void**);
NTSYSAPI NTSTATUS WINAPI RtlWow64GetThreadContext(HANDLE,WOW64_CONTEXT*);
NTSYSAPI NTSTATUS WINAPI RtlWow64SetThreadContext(HANDLE,const WOW64_CONTEXT*);
#else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment