|
The Pedigree Project 0.1
|
Collaboration diagram for ProcessorThreadAllocator: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.
| ProcessorThreadAllocator::ProcessorThreadAllocator | ( | ) |
Definition at line 29 of file ProcessorThreadAllocator.cc.
|
virtual |
Definition at line 31 of file ProcessorThreadAllocator.cc.
| void ProcessorThreadAllocator::addThread | ( | Thread * | pThread, |
| SyscallState & | state | ||
| ) |
Same as the other addThread(), but takes a SyscallState instead.
Definition at line 42 of file ProcessorThreadAllocator.cc.
References Scheduler::addThread(), PerProcessorScheduler::addThread(), and Scheduler::instance().
| 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 35 of file ProcessorThreadAllocator.cc.
References Scheduler::addThread(), PerProcessorScheduler::addThread(), and Scheduler::instance().
Referenced by Thread::Thread(), and Thread::Thread().
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 33 of file ProcessorThreadAllocator.h.
|
inline |
Sets the algorithm to use for allocating threads to cores.
Definition at line 53 of file ProcessorThreadAllocator.h.
Referenced by Scheduler::initialise().
Here is the caller graph for this function:| 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 48 of file ProcessorThreadAllocator.cc.
|
staticprivate |
Definition at line 60 of file ProcessorThreadAllocator.h.
|
private |
Definition at line 58 of file ProcessorThreadAllocator.h.