Introduced new OpenThreads::Affinity class to wrap up specification of thread affinity.

Simplified the OpenThreads::SetProcessorAffinityOfCurrentThread/Thread::SetProcessorAffinity() to utilize the new Affinity class
This commit is contained in:
Robert Osfield
2016-09-27 10:50:38 +01:00
parent 0f8a5a86e2
commit bc44da49e6
5 changed files with 108 additions and 83 deletions

View File

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