- modified concrete_hystory

- method add_thread - fix push into static_process's vector and
    dynamic_process's vector
  - method add_request - fix push into static_thread's vector and
    dynamic_thread's vetor 


git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@744 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
paolo 2006-07-09 15:25:19 +00:00
parent 519e516314
commit 301775debd
1 changed files with 12 additions and 3 deletions

View File

@ -327,7 +327,13 @@ ConcreteHistory::add_thread(const Glib::ustring& name,
StaticProcess& parent_core = parent_process.get_core(); StaticProcess& parent_core = parent_process.get_core();
StaticThread* core = new StaticThread(name, parent_core, cpu_time, arrival_time, base_priority); StaticThread* core = new StaticThread(name, parent_core, cpu_time, arrival_time, base_priority);
DynamicThread* thread = new DynamicThread(core, &parent_process); DynamicThread* thread = new DynamicThread(core, &parent_process);
// modified 9/7/06 - ps
std::vector<StaticThread*>& sta_thr = parent_core.get_threads();
sta_thr.push_back(core);
std::vector<DynamicThread*>& dyn_thr = parent_process.get_dynamic_threads();
dyn_thr.push_back(thread);
notify_change(); notify_change();
return *thread; return *thread;
} }
@ -345,7 +351,10 @@ ConcreteHistory::add_request(Thread& owner,
StaticRequest* core = new StaticRequest(&owner_core, instant); StaticRequest* core = new StaticRequest(&owner_core, instant);
DynamicRequest* req = new DynamicRequest(core, &dyn_owner); DynamicRequest* req = new DynamicRequest(core, &dyn_owner);
dyn_owner.get_requests().push_back(req); // dyn_owner.get_requests().push_back(req);
// modified 9/7/06 - ps
dyn_owner.get_dynamic_requests().push_back(req);
owner_core.get_requests().push_back(core);
notify_change(); notify_change();
return *req; return *req;
@ -366,7 +375,7 @@ ConcreteHistory::add_subrequest(Request& request,
DynamicSubRequest* subreq = new DynamicSubRequest(core, &dyn_request); DynamicSubRequest* subreq = new DynamicSubRequest(core, &dyn_request);
dyn_request.get_subrequests().push_back(subreq); dyn_request.get_subrequests().push_back(subreq);
notify_change(); notify_change();
return *subreq; return *subreq;
} }