- Only schedule Threads. Ditch support for Policies deciding
if they want to schedule Threads or Processes altogether - Move setter methods for last_acquisition/last_release from DynamicSchedulable to DynamicThread - Rewrite aforesaid methods, along with the respective getter methods, into Dynamic(Thread|Process) git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@708 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
736aa25456
commit
a378239d60
17 changed files with 119 additions and 194 deletions
|
@ -155,3 +155,44 @@ DynamicProcess::get_dynamic_threads()
|
|||
{
|
||||
return _dynamic_threads;
|
||||
}
|
||||
|
||||
unsigned int
|
||||
DynamicProcess::get_elapsed_time() const
|
||||
{
|
||||
unsigned int result = 0;
|
||||
for(std::vector<DynamicThread*>::const_iterator it = _dynamic_threads.begin();
|
||||
it != _dynamic_threads.end(); it++)
|
||||
{
|
||||
result += (*it)->get_elapsed_time();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
int
|
||||
DynamicProcess::get_last_acquisition() const
|
||||
{
|
||||
int result = -1;
|
||||
for(std::vector<DynamicThread*>::const_iterator it = _dynamic_threads.begin();
|
||||
it != _dynamic_threads.end(); it++)
|
||||
{
|
||||
int acq = (*it)->get_last_acquisition();
|
||||
if(result < acq)
|
||||
result = acq;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
int
|
||||
DynamicProcess::get_last_release() const
|
||||
{
|
||||
int result = -1;
|
||||
for(std::vector<DynamicThread*>::const_iterator it = _dynamic_threads.begin();
|
||||
it != _dynamic_threads.end(); it++)
|
||||
{
|
||||
int acq = (*it)->get_last_release();
|
||||
if(result < acq)
|
||||
result = acq;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue