Introduced OpenThreads::SetProcessorAffinityMaskOfCurrentThread(unsigned long cpumask) and Threads::setProcessorAffinityMask(unsigned long cpumask) to allow finer grained control over the CPU affinity.

This commit is contained in:
Robert Osfield
2016-09-26 19:18:15 +01:00
parent cd56639e67
commit 0f8a5a86e2
3 changed files with 87 additions and 52 deletions

View File

@@ -53,7 +53,7 @@ private:
nextId++;
threadPriority = Thread::THREAD_PRIORITY_DEFAULT;
threadPolicy = Thread::THREAD_SCHEDULE_DEFAULT;
cpunum = -1;
cpumask = ~0ul;
};
virtual ~PThreadPrivateData() {};
@@ -81,7 +81,7 @@ private:
volatile int uniqueId;
volatile int cpunum;
volatile unsigned long cpumask;
static int nextId;