The Pedigree Project  0.1
Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | List of all members
ProcessorThreadAllocator Class Reference
+ 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 ProcessorThreadAllocatorinstance ()
 

Private Attributes

ThreadToCoreAllocationAlgorithmm_pAlgorithm
 

Static Private Attributes

static ProcessorThreadAllocator m_Instance
 

Detailed Description

Definition at line 28 of file ProcessorThreadAllocator.h.

Member Function Documentation

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().

+ 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 54 of file ProcessorThreadAllocator.cc.


The documentation for this class was generated from the following files: