Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-11-22 18:03:16 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-11-22 18:03:16 +0300
commit751573ce6fff547b6a53769245814bc2d3fed17f (patch)
treec7a48856b85986eac308b7f4afc3eaf747686fe2 /intern/cycles/util/util_system.cpp
parentcb694d6595c78767874baf021096cc217858c85b (diff)
Fix T50034: Blender changes processor affinity unauthorized
Diffstat (limited to 'intern/cycles/util/util_system.cpp')
-rw-r--r--intern/cycles/util/util_system.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/intern/cycles/util/util_system.cpp b/intern/cycles/util/util_system.cpp
index d5fac9a0e34..2c7abbaacbb 100644
--- a/intern/cycles/util/util_system.cpp
+++ b/intern/cycles/util/util_system.cpp
@@ -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)
{