diff --git a/src/backend/concrete_history.cc b/src/backend/concrete_history.cc index 232a096..b49a772 100644 --- a/src/backend/concrete_history.cc +++ b/src/backend/concrete_history.cc @@ -327,13 +327,7 @@ ConcreteHistory::add_thread(const Glib::ustring& name, StaticProcess& parent_core = parent_process.get_core(); StaticThread* core = new StaticThread(name, parent_core, cpu_time, arrival_time, base_priority); DynamicThread* thread = new DynamicThread(core, &parent_process); - - // modified 9/7/06 - ps - std::vector& sta_thr = parent_core.get_threads(); - sta_thr.push_back(core); - std::vector& dyn_thr = parent_process.get_dynamic_threads(); - dyn_thr.push_back(thread); - + notify_change(); return *thread; } @@ -351,10 +345,7 @@ ConcreteHistory::add_request(Thread& owner, StaticRequest* core = new StaticRequest(&owner_core, instant); DynamicRequest* req = new DynamicRequest(core, &dyn_owner); - // 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); + dyn_owner.get_requests().push_back(req); notify_change(); return *req; @@ -375,7 +366,7 @@ ConcreteHistory::add_subrequest(Request& request, DynamicSubRequest* subreq = new DynamicSubRequest(core, &dyn_request); dyn_request.get_subrequests().push_back(subreq); - + notify_change(); return *subreq; } diff --git a/src/backend/dynamic_request.cc b/src/backend/dynamic_request.cc index 4a7bd30..5653b82 100644 --- a/src/backend/dynamic_request.cc +++ b/src/backend/dynamic_request.cc @@ -40,7 +40,10 @@ DynamicRequest::DynamicRequest(StaticRequest *core, { assert(core != NULL); assert(owner != NULL); - owner->get_requests().push_back(this); + // Leave this line: it helps us with a compiler warning if + // the get_dynamic* method signature changes: + std::vector& siblings = owner->get_dynamic_requests(); + siblings.push_back(this); } diff --git a/src/backend/dynamic_sub_request.cc b/src/backend/dynamic_sub_request.cc index e66b19c..6c96e44 100644 --- a/src/backend/dynamic_sub_request.cc +++ b/src/backend/dynamic_sub_request.cc @@ -35,7 +35,10 @@ DynamicSubRequest::DynamicSubRequest(StaticSubRequest* core, _queue_position(-1) { assert(core != NULL); - owner->get_subrequests().push_back(this); + // Leave this line: it helps us with a compiler warning if + // the get_dynamic* method signature changes: + std::vector& siblings = owner->get_dynamic_subrequests(); + siblings.push_back(this); } diff --git a/src/backend/dynamic_thread.cc b/src/backend/dynamic_thread.cc index 63032bb..37f2b95 100644 --- a/src/backend/dynamic_thread.cc +++ b/src/backend/dynamic_thread.cc @@ -37,7 +37,10 @@ DynamicThread::DynamicThread(StaticThread* core, DynamicProcess* parent) : DynamicSchedulable(), _core(core), _state(state_future), _parent(parent), _ran_for(0), _last_acquisition(-1), _last_release(-1) { - parent->get_threads().push_back(this); + // Leave this line: it helps us with a compiler warning if + // the get_dynamic* method signature changes: + std::vector& siblings = parent->get_dynamic_threads(); + siblings.push_back(this); } DynamicThread::DynamicThread(const DynamicThread &other) :