Test AMD CPU fix

Maybe a fix for #147
This commit is contained in:
Maurice Heumann 2023-02-13 11:48:03 +01:00 committed by GitHub
parent 39e442c953
commit d3296528e4

View File

@ -755,6 +755,17 @@ namespace arxan
{ {
search_and_patch_integrity_checks(); search_and_patch_integrity_checks();
//restore_debug_functions(); //restore_debug_functions();
scheduler::once([]
{
SetProcessAffinityMask(GetCurrentProcess(), 2 << (std::min(std::thread::hardware_concurrency(), 4U)));
scheduler::once([] {
DWORD_PTR affinity_proc, affinity_sys;
GetProcessAffinityMask(GetCurrentProcess(), &affinity_proc, &affinity_sys);
SetProcessAffinityMask(GetCurrentProcess(), affinity_sys);
}, scheduler::pipeline::main, 1s);
}, scheduler::pipeline::main);
} }
component_priority priority() const override component_priority priority() const override