From 1f7972c308dbf3e6d47641b742f984cd400ddf5c Mon Sep 17 00:00:00 2001 From: elvez Date: Tue, 13 Jun 2006 13:55:47 +0000 Subject: [PATCH] - Renamed Schedulable to StaticSchedulable git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@626 3ecf2c5c-341e-0410-92b4-d18e462d057c --- Makefile.am | 4 ++-- plugins/pyloader/src/sgpem.i | 12 ++++++------ src/backend/process.cc | 2 +- src/backend/process.hh | 4 ++-- src/backend/schedulable_status.cc | 4 ++-- src/backend/schedulable_status.hh | 8 ++++---- .../{schedulable.cc => static_schedulable.cc} | 16 ++++++++-------- .../{schedulable.hh => static_schedulable.hh} | 14 +++++++------- src/main.cc | 2 +- 9 files changed, 33 insertions(+), 33 deletions(-) rename src/backend/{schedulable.cc => static_schedulable.cc} (75%) rename src/backend/{schedulable.hh => static_schedulable.hh} (89%) diff --git a/Makefile.am b/Makefile.am index a07e7ec..e738d3d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -148,7 +148,7 @@ src_backend_libbackend_la_SOURCES = \ src/backend/policy_manager.cc \ src/backend/policy_parameters.cc \ src/backend/process.cc \ - src/backend/schedulable.cc \ + src/backend/static_schedulable.cc \ src/backend/schedulable_queue.cc \ src/backend/schedulable_status.cc \ src/backend/scheduler.cc \ @@ -167,7 +167,7 @@ pkginclude_HEADERS = \ src/backend/policy_manager.hh \ src/backend/policy_parameters.hh \ src/backend/process.hh \ - src/backend/schedulable.hh \ + src/backend/static_schedulable.hh \ src/backend/schedulable_queue.hh \ src/backend/schedulable_status.hh \ src/backend/scheduler.hh \ diff --git a/plugins/pyloader/src/sgpem.i b/plugins/pyloader/src/sgpem.i index 7c2d203..109256a 100644 --- a/plugins/pyloader/src/sgpem.i +++ b/plugins/pyloader/src/sgpem.i @@ -2,7 +2,7 @@ %{ #include "policy.hh" #include "policy_parameters.hh" -#include "schedulable.hh" +#include "static_schedulable.hh" #include "schedulable_queue.hh" #include "schedulable_status.hh" #include "scheduler.hh" @@ -130,21 +130,21 @@ namespace sgpem { }; //~ class PolicyParameters // -------------------------------------------- - class Schedulable + class StaticSchedulable { public: - virtual ~Schedulable() = 0; + virtual ~StaticSchedulable() = 0; virtual unsigned int get_arrival_time() const; int get_priority() const; unsigned int get_total_cpu_time() const; - %ignore Schedulable::get_name() const; + %ignore StaticSchedulable::get_name() const; %extend { const char* get_name() const { return self->get_name().c_str(); } } - }; //~ class Schedulable + }; //~ class StaticSchedulable // -------------------------------------------- @@ -181,7 +181,7 @@ namespace sgpem { int get_cpu_time_left() const; int get_last_scheduled() const; state get_state() const; - const sgpem::Schedulable* get_schedulable() const; + const sgpem::StaticSchedulable* get_schedulable() const; }; // --------------------------------------------- diff --git a/src/backend/process.cc b/src/backend/process.cc index 78324d7..1969208 100644 --- a/src/backend/process.cc +++ b/src/backend/process.cc @@ -23,7 +23,7 @@ using namespace sgpem; Process::Process(const Glib::ustring& name, const unsigned int& arrival, const unsigned int& total, const int& priority) - : Schedulable(name, arrival, total, priority) + : StaticSchedulable(name, arrival, total, priority) { } diff --git a/src/backend/process.hh b/src/backend/process.hh index 14cab54..b4d8ed2 100644 --- a/src/backend/process.hh +++ b/src/backend/process.hh @@ -25,7 +25,7 @@ #include "gettext.h" #include "glibmm/ustring.h" -#include "schedulable.hh" +#include "static_schedulable.hh" namespace sgpem { @@ -35,7 +35,7 @@ namespace sgpem It IS a Schedulable object. */ - class SG_DLLEXPORT Process : public Schedulable + class SG_DLLEXPORT Process : public StaticSchedulable { public: /** \brief Creates a new object with the given parameters. */ diff --git a/src/backend/schedulable_status.cc b/src/backend/schedulable_status.cc index 831304c..2d25117 100644 --- a/src/backend/schedulable_status.cc +++ b/src/backend/schedulable_status.cc @@ -23,7 +23,7 @@ using namespace sgpem; using namespace std; -SchedulableStatus::SchedulableStatus(const Schedulable& obj) : +SchedulableStatus::SchedulableStatus(const StaticSchedulable& obj) : _ref(&obj), _last(-1), _time_left(obj.get_total_cpu_time()), _my_state(state_future) { @@ -73,7 +73,7 @@ SchedulableStatus::set_state(state s) _my_state = s; } -const Schedulable* +const StaticSchedulable* SchedulableStatus::get_schedulable() const { return _ref; diff --git a/src/backend/schedulable_status.hh b/src/backend/schedulable_status.hh index d24e6db..6a10341 100644 --- a/src/backend/schedulable_status.hh +++ b/src/backend/schedulable_status.hh @@ -22,7 +22,7 @@ #define SCHEDULABLESTATUS_HH 1 #include "config.h" -#include "schedulable.hh" +#include "static_schedulable.hh" namespace sgpem { @@ -57,7 +57,7 @@ namespace sgpem }; /** \brief Object constructor */ - SchedulableStatus(const Schedulable& obj); + SchedulableStatus(const StaticSchedulable& obj); //SchedulableStatus(const SchedulableStatus& obj); //copy constructor @@ -94,10 +94,10 @@ namespace sgpem * This function returns a pointer to the actual schedable object * represented, along with its status, by this instance. */ - const Schedulable* get_schedulable() const; + const StaticSchedulable* get_schedulable() const; private: - const Schedulable* _ref; + const StaticSchedulable* _ref; int _last; int _time_left; state _my_state; diff --git a/src/backend/schedulable.cc b/src/backend/static_schedulable.cc similarity index 75% rename from src/backend/schedulable.cc rename to src/backend/static_schedulable.cc index c10737c..7cf13c5 100644 --- a/src/backend/schedulable.cc +++ b/src/backend/static_schedulable.cc @@ -1,4 +1,4 @@ -// src/backend/schedulable.cc - Copyright 2005, 2006, University +// src/backend/static_schedulable.cc - Copyright 2005, 2006, University // of Padova, dept. of Pure and Applied // Mathematics // @@ -18,11 +18,11 @@ // along with SGPEMv2; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -#include "schedulable.hh" +#include "static_schedulable.hh" using namespace sgpem; -Schedulable::Schedulable(const Glib::ustring& name, +StaticSchedulable::StaticSchedulable(const Glib::ustring& name, const unsigned int& arrival, const unsigned int& total, const int& priority) : @@ -30,32 +30,32 @@ Schedulable::Schedulable(const Glib::ustring& name, { } -Schedulable::~Schedulable() +StaticSchedulable::~StaticSchedulable() { } unsigned int -Schedulable::get_arrival_time() const +StaticSchedulable::get_arrival_time() const { return _arrival_time; } unsigned int -Schedulable::get_total_cpu_time() const +StaticSchedulable::get_total_cpu_time() const { return _total_time; } int -Schedulable::get_priority() const +StaticSchedulable::get_priority() const { return _priority; } Glib::ustring -Schedulable::get_name() const +StaticSchedulable::get_name() const { return _name; } diff --git a/src/backend/schedulable.hh b/src/backend/static_schedulable.hh similarity index 89% rename from src/backend/schedulable.hh rename to src/backend/static_schedulable.hh index 4564fb2..bc5fbe3 100644 --- a/src/backend/schedulable.hh +++ b/src/backend/static_schedulable.hh @@ -1,4 +1,4 @@ -// src/backend/schedulable.hh - Copyright 2005, 2006, University +// src/backend/static_schedulable.hh - Copyright 2005, 2006, University // of Padova, dept. of Pure and Applied // Mathematics // @@ -18,15 +18,15 @@ // along with SGPEMv2; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -#ifndef SCHEDULABLE_HH -#define SCHEDULABLE_HH 1 +#ifndef STATIC_SCHEDULABLE_HH +#define STATIC_SCHEDULABLE_HH 1 #include "config.h" #include "glibmm/ustring.h" namespace sgpem { - class Schedulable; + class StaticSchedulable; /** \brief An entity that can use the processor * @@ -38,13 +38,13 @@ namespace sgpem * * \see SchedulableStatus */ - class SG_DLLEXPORT Schedulable + class SG_DLLEXPORT StaticSchedulable { public: /** \brief Create a new object with the given parameters */ - Schedulable(const Glib::ustring& name, const unsigned int& arrival, + StaticSchedulable(const Glib::ustring& name, const unsigned int& arrival, const unsigned int& total, const int& priority); - virtual ~Schedulable(); + virtual ~StaticSchedulable(); /** \brief Returns the arrival time for this process * diff --git a/src/main.cc b/src/main.cc index 058a75b..4e98b60 100644 --- a/src/main.cc +++ b/src/main.cc @@ -27,7 +27,7 @@ #include "templates/smartp.hh" #include "backend/history.hh" -#include "backend/schedulable.hh" +#include "backend/static_schedulable.hh" #include "backend/schedulable_queue.hh" #include "backend/schedulable_status.hh" #include "backend/slice.hh"