Skip to content

Commit

Permalink
[NativeAOT] reenable APC2 use on arm64 (dotnet#102667)
Browse files Browse the repository at this point in the history
* reenable APC2 use onarm64

* make it build again

* Apply suggestions from code review

Co-authored-by: Jan Kotas <[email protected]>

---------

Co-authored-by: Jan Kotas <[email protected]>
  • Loading branch information
VSadov and jkotas authored May 24, 2024
1 parent bbcde65 commit 80374cc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/coreclr/nativeaot/Runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ if(CLR_CMAKE_TARGET_WIN32)
set(FEATURE_ETW 1)
add_definitions(-DFEATURE_ETW)
add_definitions(-DFEATURE_SUSPEND_REDIRECTION)
if (CLR_CMAKE_TARGET_ARCH_AMD64)
if (CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_ARM64)
add_definitions(-DFEATURE_SPECIAL_USER_MODE_APC)
endif()
if (CLR_CMAKE_TARGET_ARCH_I386)
Expand Down
3 changes: 1 addition & 2 deletions src/coreclr/nativeaot/Runtime/windows/PalRedhawkMinWin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -640,9 +640,8 @@ REDHAWK_PALEXPORT void REDHAWK_PALAPI PalHijack(HANDLE hThread, _In_opt_ void* p
// so simple conditional assignment is ok.
if (g_pfnQueueUserAPC2Proc == QUEUE_USER_APC2_UNINITIALIZED)
{
#ifdef HOST_AMD64
HMODULE hKernel32 = LoadKernel32dll();

#ifdef HOST_AMD64
typedef BOOL (WINAPI *IsWow64Process2Proc)(HANDLE hProcess, USHORT *pProcessMachine, USHORT *pNativeMachine);

IsWow64Process2Proc pfnIsWow64Process2Proc = (IsWow64Process2Proc)GetProcAddress(hKernel32, "IsWow64Process2");
Expand Down

0 comments on commit 80374cc

Please sign in to comment.