Fix T50034: Blender changes processor affinity unauthorized

This commit is contained in:
Sergey Sharybin
2016-11-22 16:03:16 +01:00
parent cb694d6595
commit 751573ce6f
5 changed files with 68 additions and 3 deletions

View File

@@ -89,6 +89,20 @@ int system_cpu_thread_count()
return count;
}
unsigned short system_cpu_process_groups(unsigned short max_groups,
unsigned short *grpups)
{
#ifdef _WIN32
unsigned short group_count = max_groups;
if(!GetProcessGroupAffinity(GetCurrentProcess(), &group_count, grpups)) {
return 0;
}
return group_count;
#else
return 0;
#endif
}
#if !defined(_WIN32) || defined(FREE_WINDOWS)
static void __cpuid(int data[4], int selector)
{