20#include "pedigree/kernel/LockGuard.h"
21#include "pedigree/kernel/Log.h"
22#include "pedigree/kernel/process/PerProcessorScheduler.h"
23#include "pedigree/kernel/process/RoundRobinCoreAllocator.h"
24#include "pedigree/kernel/process/Thread.h"
25#include "pedigree/kernel/utilities/Iterator.h"
26#include "pedigree/kernel/utilities/utility.h"
31RoundRobinCoreAllocator::RoundRobinCoreAllocator() : m_ProcMap(), m_pNext(0) {}
33RoundRobinCoreAllocator::~RoundRobinCoreAllocator() {}
41 if (it == procList.
end()) {
42 NOTICE(
"RoundRobinCoreAllocator: quitting, only one CPU was present.");
43 m_ProcMap.
insert(pFirst, pFirst);
47 for (; it != procList.
end(); it++) {
48 m_ProcMap.
insert(pFirst, *it);
53 m_ProcMap.
insert(pFirst, m_pNext);
64 m_pNext = m_ProcMap.
lookup(m_pNext);
65 if (placement.allowed.empty() || placement.allowed.contains(m_pNext->logicalCpu()))
67 }
while (m_pNext != first);
68 FATAL(
"Thread allocator found no allowed online processor.");
::Iterator< T, node_t > Iterator
void snapshotPlacementLocked(ThreadPlacement &placement) const
E lookup(const K &key) const
void insert(const K &key, const E &value)