auditing performed, made some changes like removed std, or corrected the name of the file, and in come cases added the licence text where it was missing --gv

git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@1218 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
jinx 2006-09-17 01:16:37 +00:00
parent caa067c4c6
commit 925e8e7671
14 changed files with 38 additions and 34 deletions

View File

@ -32,9 +32,9 @@
#include <algorithm> #include <algorithm>
#include <cassert> #include <cassert>
#include <functional> #include <functional>
#include <string>
#include <iostream> #include <iostream>
using namespace std;
using namespace sgpem; using namespace sgpem;
using namespace memory; using namespace memory;
@ -216,10 +216,6 @@ ConcreteSimulation::set_policy(CPUPolicy* p) throw(CPUPolicyException)
{ {
stop(); stop();
// NOTE: restoring of the previous policy is done here because I
// couldn't think of a clean way to do it
// inside activate_policy()
try try
{ {
CPUPoliciesGatekeeper::get_instance().activate_policy(&_history, p); CPUPoliciesGatekeeper::get_instance().activate_policy(&_history, p);
@ -236,13 +232,13 @@ ConcreteSimulation::set_policy(CPUPolicy* p) throw(CPUPolicyException)
{ {
_policy = NULL; _policy = NULL;
string msg = _("unable to change policy and to restore the previous: "); std::string msg = _("unable to change policy and to restore the previous: ");
msg += e2.what(); msg += e2.what();
throw CPUPolicyException(msg); throw CPUPolicyException(msg);
} }
string msg = _("unable to change policy: "); std::string msg = _("unable to change policy: ");
msg+= e1.what(); msg+= e1.what();
throw CPUPolicyException(msg); throw CPUPolicyException(msg);

View File

@ -31,8 +31,6 @@
#include <sgpemv2/templates/smartp.tcc> #include <sgpemv2/templates/smartp.tcc>
using namespace sgpem; using namespace sgpem;
using namespace std;
DynamicThread::DynamicThread(StaticThread* core, DynamicProcess* parent) DynamicThread::DynamicThread(StaticThread* core, DynamicProcess* parent)
: DynamicSchedulable(), _core(core), _state(state_future), _parent(parent), : DynamicSchedulable(), _core(core), _state(state_future), _parent(parent),
@ -53,11 +51,11 @@ DynamicThread::DynamicThread(const DynamicThread &other, DynamicProcess* parent)
_ran_for(other._ran_for), _last_acquisition(other._last_acquisition), _ran_for(other._ran_for), _last_acquisition(other._last_acquisition),
_last_release(other._last_release) _last_release(other._last_release)
{ {
typedef vector<DynamicRequest*>::const_iterator ReqIt; typedef std::vector<DynamicRequest*>::const_iterator ReqIt;
assert(parent != NULL); assert(parent != NULL);
const vector<DynamicRequest*>& other_req = other._dynamic_requests; const std::vector<DynamicRequest*>& other_req = other._dynamic_requests;
for (ReqIt it = other_req.begin(); it != other_req.end(); ++it) for (ReqIt it = other_req.begin(); it != other_req.end(); ++it)
new DynamicRequest(*(*it), this); new DynamicRequest(*(*it), this);
@ -96,16 +94,15 @@ DynamicThread::set_state(state new_state)
return old_state; return old_state;
} }
vector<Request*> std::vector<Request*>
DynamicThread::get_requests() DynamicThread::get_requests()
{ {
return vector<Request*>(_dynamic_requests.begin(), _dynamic_requests.end()); return std::vector<Request*>(_dynamic_requests.begin(), _dynamic_requests.end());
} }
void void
DynamicThread::serialize(SerializeVisitor& translator) const DynamicThread::serialize(SerializeVisitor& translator) const
{ {
//translator.from_thread(*_core);
translator.from_thread(*this); translator.from_thread(*this);
} }

View File

@ -25,17 +25,19 @@
#include <algorithm> #include <algorithm>
#include <functional> #include <functional>
using namespace sgpem; using namespace sgpem;
using namespace std;
History::History() History::History()
: _front(0), _notify(true) : _front(0), _notify(true)
{} {
}
History::~History() History::~History()
{} {
}
void void

View File

@ -23,9 +23,11 @@
// catching it (with typeinfo). // catching it (with typeinfo).
#include <sgpemv2/null_policy_exception.hh> #include <sgpemv2/null_policy_exception.hh>
using namespace sgpem; using namespace sgpem;
NullPolicyException::NullPolicyException(const char* msg) NullPolicyException::NullPolicyException(const char* msg)
: std::runtime_error(msg) : std::runtime_error(msg)
{} {
}

View File

@ -34,7 +34,6 @@
#include <algorithm> #include <algorithm>
using namespace sgpem; using namespace sgpem;
using namespace std;
template class SG_DLLEXPORT Singleton<PluginManager>; template class SG_DLLEXPORT Singleton<PluginManager>;

View File

@ -23,5 +23,6 @@
using namespace sgpem; using namespace sgpem;
Resource::~Resource() Resource::~Resource()
{} {
}

View File

@ -22,11 +22,11 @@
#include <sgpemv2/thread.hh> #include <sgpemv2/thread.hh>
using namespace std;
using namespace sgpem; using namespace sgpem;
ResourcePolicyPriority::~ResourcePolicyPriority() ResourcePolicyPriority::~ResourcePolicyPriority()
{} {
}
PolicyParameters& PolicyParameters&

View File

@ -18,13 +18,15 @@
// along with SGPEMv2; if not, write to the Free Software // along with SGPEMv2; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "sgpemv2/schedulable_statistics.hh" #include <sgpemv2/schedulable_statistics.hh>
using namespace sgpem; using namespace sgpem;
SchedulableStatistics::SchedulableStatistics() SchedulableStatistics::SchedulableStatistics()
{} {
}
SchedulableStatistics::~SchedulableStatistics() SchedulableStatistics::~SchedulableStatistics()
{} {
}

View File

@ -1,4 +1,4 @@
// src/backend/policies_gatekeeper.cc - Copyright 2005, 2006, University // src/backend/serializers_gatekeeper.cc - Copyright 2005, 2006, University
// of Padova, dept. of Pure and Applied // of Padova, dept. of Pure and Applied
// Mathematics // Mathematics
// //
@ -73,5 +73,6 @@ SerializersGatekeeper::unregister_serializer(Serializer* serializer)
SerializersGatekeeper::SerializersGatekeeper() SerializersGatekeeper::SerializersGatekeeper()
{} {
}

View File

@ -43,7 +43,7 @@ namespace sgpem
virtual void serialize(SerializeVisitor& translator) const = 0; virtual void serialize(SerializeVisitor& translator) const = 0;
}; };
} }//~namespace sgpem
#endif #endif //~ PROCESS_HH

View File

@ -89,4 +89,4 @@ namespace sgpem
}//~ namespace sgpem }//~ namespace sgpem
#endif #endif //~ RESOURCE_POLICY_FIFO_HH

View File

@ -56,5 +56,5 @@ namespace sgpem
} //~ namespace sgpem } //~ namespace sgpem
#endif #endif // ~ RESOURCE_POLICY_MANAGER_HH

View File

@ -1,4 +1,8 @@
// smartp.hh - Copyright 2005, Matteo Settenvini // src/backend/sgpemv2/templates/smartp.hh - Copyright 2005, 2006, University
// of Padova, dept. of Pure and Applied
// Mathematics
//
// This file is part of SGPEMv2.
// //
// This program is free software; you can redistribute it and/or modify // This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by // it under the terms of the GNU General Public License as published by

View File

@ -43,7 +43,7 @@ namespace sgpem
virtual void serialize(SerializeVisitor& translator) const = 0; virtual void serialize(SerializeVisitor& translator) const = 0;
}; };
} }//~ namespace sgpem
#endif #endif//~ THREAD_HH