The Pedigree Project
0.1
|
Public Member Functions | |
void | addThread (Thread *pThread, Thread::ThreadStartFunc pStartFunction, void *pParam, bool bUsermode, void *pStack) |
void | addThread (Thread *pThread, SyscallState &state) |
Same as the other addThread(), but takes a SyscallState instead. | |
void | threadRemoved (Thread *pThread) |
void | setAlgorithm (ThreadToCoreAllocationAlgorithm *pAlgorithm) |
Sets the algorithm to use for allocating threads to cores. | |
Static Public Member Functions | |
static ProcessorThreadAllocator & | instance () |
Private Attributes | |
ThreadToCoreAllocationAlgorithm * | m_pAlgorithm |
Static Private Attributes | |
static ProcessorThreadAllocator | m_Instance |
Definition at line 28 of file ProcessorThreadAllocator.h.
void ProcessorThreadAllocator::addThread | ( | Thread * | pThread, |
Thread::ThreadStartFunc | pStartFunction, | ||
void * | pParam, | ||
bool | bUsermode, | ||
void * | pStack | ||
) |
Called when a thread is to be added to the system schedule. This function adds the thread to the correct PerProcessorScheduler (as per the allocation algorithm) and deals with everything on the scheduler side. If a new thread is to be added to the schedule, only this function should need to be called.
Definition at line 38 of file ProcessorThreadAllocator.cc.
References Scheduler::addThread(), PerProcessorScheduler::addThread(), and Scheduler::instance().
Referenced by Thread::Thread().
void ProcessorThreadAllocator::threadRemoved | ( | Thread * | pThread | ) |
Notifies an algorithm a thread has been removed. This allows a rebalance operation or something similar to take place.
Definition at line 54 of file ProcessorThreadAllocator.cc.