diff --git a/Makefile.am b/Makefile.am index c71e4d6..b133e4a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -45,9 +45,9 @@ aclocaldir = @datadir@/aclocal #define empty global variables bin_PROGRAMS = +pkglib_LTLIBRARIES = plugin_LTLIBRARIES = noinst_HEADERS = -pkglib_LTLIBRARIES = pkginclude_HEADERS = EXTRA_DIST = MAINTAINERCLEANFILES = @@ -175,14 +175,10 @@ src_backend_libbackend_la_SOURCES = \ src/backend/thread.cc \ src/backend/user_interrupt_exception.cc +# Put here header files that will be installed for the user +# For headers used internally by the backend, see below. pkginclude_HEADERS += \ config.h \ - src/backend/dynamic_process.hh \ - src/backend/dynamic_request.hh \ - src/backend/dynamic_resource.hh \ - src/backend/dynamic_schedulable.hh \ - src/backend/dynamic_sub_request.hh \ - src/backend/dynamic_thread.hh \ src/backend/global_preferences.hh \ src/backend/history.hh \ src/backend/observed_subject.hh \ @@ -198,16 +194,27 @@ pkginclude_HEADERS += \ src/backend/schedulable_queue.hh \ src/backend/scheduler.hh \ src/backend/slice.hh \ + src/backend/sub_request.hh \ + src/backend/thread.hh \ + src/backend/user_interrupt_exception.hh + +# Put here headers used internally by the backend +# They won't be installed for the end-user. +noinst_HEADERS += \ + src/backend/dynamic_process.hh \ + src/backend/dynamic_request.hh \ + src/backend/dynamic_resource.hh \ + src/backend/dynamic_schedulable.hh \ + src/backend/dynamic_sub_request.hh \ + src/backend/dynamic_thread.hh \ src/backend/static_process.hh \ src/backend/static_request.hh \ src/backend/static_resource.hh \ src/backend/static_schedulable.hh \ src/backend/static_sub_request.hh \ src/backend/static_thread.hh \ - src/backend/string_utils.hh \ - src/backend/sub_request.hh \ - src/backend/thread.hh \ - src/backend/user_interrupt_exception.hh + src/backend/string_utils.hh + # ############################################################ # diff --git a/plugins/pyloader/src/builtin-policies/fcfs.py b/plugins/pyloader/src/builtin-policies/fcfs.py index 5c43b9d..805c62b 100644 --- a/plugins/pyloader/src/builtin-policies/fcfs.py +++ b/plugins/pyloader/src/builtin-policies/fcfs.py @@ -41,6 +41,6 @@ class fcfs(Policy) : def sort_queue(self, queue): cmpf = lambda a, b: \ - a.get_schedulable().get_arrival_time() < \ - b.get_schedulable().get_arrival_time() + a.get_arrival_time() < \ + b.get_arrival_time() self.sort(queue,cmpf) diff --git a/plugins/pyloader/src/builtin-policies/sjf.py b/plugins/pyloader/src/builtin-policies/sjf.py index 8ee8281..12707b3 100644 --- a/plugins/pyloader/src/builtin-policies/sjf.py +++ b/plugins/pyloader/src/builtin-policies/sjf.py @@ -41,6 +41,6 @@ class sjf(Policy) : def sort_queue(self, queue): cmpf = lambda a, b: \ - a.get_cpu_time_left() < \ - b.get_cpu_time_left() + a.get_remaining_time() < \ + b.get_remaining_time() self.sort(queue,cmpf) diff --git a/plugins/pyloader/src/sgpem.i b/plugins/pyloader/src/sgpem.i index f47e4e5..0d38284 100644 --- a/plugins/pyloader/src/sgpem.i +++ b/plugins/pyloader/src/sgpem.i @@ -130,21 +130,33 @@ namespace sgpem { }; //~ class PolicyParameters // -------------------------------------------- - class StaticSchedulable + class Schedulable { public: - virtual ~StaticSchedulable() = 0; - - virtual unsigned int get_arrival_time() const; - int get_priority() const; - unsigned int get_total_cpu_time() const; + virtual ~Schedulable() = 0; + + enum state + { + state_running = 1<<0, + state_ready = 1<<1, + state_blocked = 1<<2, + state_future = 1<<3, + state_terminated = 1<<4 + }; - %ignore StaticSchedulable::get_name() const; - %extend { - const char* get_name() const + virtual unsigned int get_arrival_time() const = 0; + virtual unsigned int get_remaining_time() const = 0; + virtual int get_base_priority() const = 0; + virtual int get_current_priority() const = 0; + virtual unsigned int get_total_cpu_time() const = 0; + virtual state get_state() const = 0; + + %ignore Schedulable::get_name() const; + %extend { + const char* get_name() const { return self->get_name().c_str(); } - } - }; //~ class StaticSchedulable + } + }; //~ class Schedulable // -------------------------------------------- @@ -152,7 +164,7 @@ namespace sgpem { { public: unsigned int size() const; - const sgpem::DynamicSchedulable* get_item_at(const unsigned int&) const; + const sgpem::Schedulable* get_item_at(const unsigned int&) const; void swap(unsigned int positionA, unsigned int positionB) throw(); private: @@ -163,36 +175,15 @@ namespace sgpem { ~SchedulableQueue(); }; //~ class Schedulable - // --------------------------------------------- - class DynamicSchedulable - { - public: - enum state - { - state_running = 1<<0, - state_ready = 1<<1, - state_blocked = 1<<2, - state_future = 1<<3, - state_terminated = 1<<4 + // --------------------------------------------- + class Scheduler { + public: + sgpem::Policy& get_policy(); + static sgpem::Scheduler& get_instance(); + sgpem::SchedulableQueue* get_ready_queue(); + private: + Scheduler(); + ~Scheduler(); }; - - DynamicSchedulable(const DynamicSchedulable& obj); - - int get_cpu_time_left() const; - int get_last_scheduled() const; - state get_state() const; - const sgpem::StaticSchedulable* get_schedulable() const; - }; - - // --------------------------------------------- - class Scheduler { - public: - sgpem::Policy& get_policy(); - static sgpem::Scheduler& get_instance(); - sgpem::SchedulableQueue* get_ready_queue(); - private: - Scheduler(); - ~Scheduler(); - }; } //~ namespace sgpem diff --git a/src/backend/dynamic_process.hh b/src/backend/dynamic_process.hh index 3fa116e..53b4e81 100644 --- a/src/backend/dynamic_process.hh +++ b/src/backend/dynamic_process.hh @@ -27,7 +27,6 @@ #include #include "process.hh" -#include "../templates/smartp.hh" #include "dynamic_schedulable.hh" namespace sgpem diff --git a/src/backend/dynamic_request.cc b/src/backend/dynamic_request.cc index e3f7b27..2b94938 100644 --- a/src/backend/dynamic_request.cc +++ b/src/backend/dynamic_request.cc @@ -21,6 +21,9 @@ #include "dynamic_request.hh" #include "static_request.hh" #include "dynamic_sub_request.hh" + +#include "smartp.tcc" + #include using namespace sgpem; diff --git a/src/backend/dynamic_request.hh b/src/backend/dynamic_request.hh index e886916..40a0c10 100644 --- a/src/backend/dynamic_request.hh +++ b/src/backend/dynamic_request.hh @@ -22,11 +22,14 @@ #define DYNAMIC_REQUEST_HH 1 #include "config.h" -#include "../templates/smartp.hh" -#include + #include "request.hh" #include "static_request.hh" +#include "smartp.hh" + +#include + namespace sgpem { class DynamicRequest; diff --git a/src/backend/dynamic_resource.cc b/src/backend/dynamic_resource.cc index 5cb62a4..d8307b1 100644 --- a/src/backend/dynamic_resource.cc +++ b/src/backend/dynamic_resource.cc @@ -21,6 +21,8 @@ #include "dynamic_resource.hh" #include "static_resource.hh" +#include "smartp.tcc" + using namespace sgpem; DynamicResource::DynamicResource(StaticResource *core) : diff --git a/src/backend/dynamic_resource.hh b/src/backend/dynamic_resource.hh index 4f1b915..f3a6c71 100644 --- a/src/backend/dynamic_resource.hh +++ b/src/backend/dynamic_resource.hh @@ -23,7 +23,8 @@ #include "config.h" #include "glibmm/ustring.h" -#include "../templates/smartp.hh" + +#include "smartp.hh" #include "resource.hh" diff --git a/src/backend/dynamic_schedulable.cc b/src/backend/dynamic_schedulable.cc index a49449d..35bd2c8 100644 --- a/src/backend/dynamic_schedulable.cc +++ b/src/backend/dynamic_schedulable.cc @@ -20,6 +20,8 @@ #include "dynamic_schedulable.hh" +#include "smartp.tcc" + using namespace sgpem; using namespace std; diff --git a/src/backend/dynamic_schedulable.hh b/src/backend/dynamic_schedulable.hh index 8279109..126e7ee 100644 --- a/src/backend/dynamic_schedulable.hh +++ b/src/backend/dynamic_schedulable.hh @@ -24,7 +24,8 @@ #include "config.h" #include "schedulable.hh" #include "static_schedulable.hh" -#include "../templates/smartp.hh" + +#include "smartp.hh" namespace sgpem { diff --git a/src/backend/dynamic_sub_request.cc b/src/backend/dynamic_sub_request.cc index 8857e4b..0ed85df 100644 --- a/src/backend/dynamic_sub_request.cc +++ b/src/backend/dynamic_sub_request.cc @@ -20,6 +20,10 @@ #include "dynamic_sub_request.hh" +#include "smartp.tcc" + +#include + using namespace sgpem; DynamicSubRequest::DynamicSubRequest(StaticSubRequest* core, diff --git a/src/backend/dynamic_sub_request.hh b/src/backend/dynamic_sub_request.hh index bcc35bd..754ca2c 100644 --- a/src/backend/dynamic_sub_request.hh +++ b/src/backend/dynamic_sub_request.hh @@ -26,6 +26,8 @@ #include "dynamic_resource.hh" #include "static_sub_request.hh" +#include "smartp.hh" + namespace sgpem { class DynamicSubRequest; diff --git a/src/backend/dynamic_thread.cc b/src/backend/dynamic_thread.cc index 9ffe8f4..0909690 100644 --- a/src/backend/dynamic_thread.cc +++ b/src/backend/dynamic_thread.cc @@ -23,6 +23,8 @@ #include "dynamic_request.hh" #include +#include "smartp.tcc" + using namespace sgpem; using std::vector; diff --git a/src/backend/dynamic_thread.hh b/src/backend/dynamic_thread.hh index 44fbed0..85929ff 100644 --- a/src/backend/dynamic_thread.hh +++ b/src/backend/dynamic_thread.hh @@ -28,9 +28,10 @@ #include "thread.hh" #include "dynamic_process.hh" -#include "../templates/smartp.hh" #include "dynamic_schedulable.hh" +#include "smartp.hh" + namespace sgpem { class DynamicThread; diff --git a/src/backend/global_preferences.cc b/src/backend/global_preferences.cc index 426f77f..7aaf079 100644 --- a/src/backend/global_preferences.cc +++ b/src/backend/global_preferences.cc @@ -21,9 +21,12 @@ #include "config.h" #include "global_preferences.hh" +// Do not include in header file: +#include "singleton.tcc" using namespace sgpem; -GlobalPreferences* GlobalPreferences::_instance = NULL; +// Explicit template instantiation to allow to export symbols from the DSO. +template class SG_DLLEXPORT Singleton; GlobalPreferences::GlobalPreferences() : _mod_dirs(1, PLUGDIR), _pol_dirs(1, POLDIR) @@ -71,10 +74,3 @@ GlobalPreferences::add_policies_dir(const Glib::ustring& poldir) _pol_dirs.insert(_pol_dirs.begin(), poldir); } -GlobalPreferences& -GlobalPreferences::get_instance() -{ - if(_instance == NULL) - _instance = new GlobalPreferences(); - return *_instance; -} diff --git a/src/backend/global_preferences.hh b/src/backend/global_preferences.hh index 3c0ccb8..edb2568 100644 --- a/src/backend/global_preferences.hh +++ b/src/backend/global_preferences.hh @@ -26,6 +26,7 @@ #include #include +// Do not include complete template definition here: #include "singleton.hh" namespace sgpem { @@ -35,7 +36,7 @@ namespace sgpem { #include "config.h" namespace sgpem { - class SG_DLLEXPORT GlobalPreferences /*: public Singleton*/ + class SG_DLLEXPORT GlobalPreferences : public Singleton { friend class Singleton; @@ -51,8 +52,6 @@ namespace sgpem { void add_modules_dir(const Glib::ustring& moddir); void add_policies_dir(const Glib::ustring& poldir); - static GlobalPreferences& get_instance(); - private: GlobalPreferences(); GlobalPreferences(const GlobalPreferences&); @@ -60,8 +59,6 @@ namespace sgpem { std::vector _mod_dirs; std::vector _pol_dirs; - - static GlobalPreferences* _instance; }; } diff --git a/src/backend/history.cc b/src/backend/history.cc index 35ad00d..0e42470 100644 --- a/src/backend/history.cc +++ b/src/backend/history.cc @@ -18,12 +18,24 @@ // along with SGPEMv2; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +#include "config.h" + #include "history.hh" + +// Do not include in header file: +#include "singleton.tcc" +#include "smartp.tcc" + using namespace std; using namespace sgpem; using namespace memory; -History* History::_instance = NULL; +// Explicit template instantiation to allow to export symbols from the DSO. +template class SG_DLLEXPORT Singleton; + +// FIXME: These two should disappear!!! +template class SG_DLLEXPORT smart_ptr; +template class SG_DLLEXPORT smart_ptr; /** The constructor sets _total_time_elapsed to -1: this permits to insert the INITIAL STATUS @@ -135,12 +147,3 @@ History::truncate_at(int instant) notify(); } -History& -History::get_instance() -{ - if(_instance == NULL) - _instance = new History(); - return *_instance; -} - - diff --git a/src/backend/history.hh b/src/backend/history.hh index 943568a..fcab445 100644 --- a/src/backend/history.hh +++ b/src/backend/history.hh @@ -30,8 +30,9 @@ #include "observed_subject.hh" #include "schedulable_queue.hh" #include "dynamic_schedulable.hh" -#include "../templates/smartp.hh" +#include "smartp.hh" +// Do not include complete template definition here: #include "singleton.hh" namespace sgpem @@ -49,7 +50,7 @@ namespace sgpem */ class History; - class SG_DLLEXPORT History : /*public Singleton,*/ public ObservedSubject + class SG_DLLEXPORT History : public Singleton, public ObservedSubject { friend class Singleton; @@ -86,9 +87,6 @@ namespace sgpem */ virtual void truncate_at(int instant); - static History& get_instance(); - - protected: History(); //private constructor. History(const History&); @@ -97,7 +95,6 @@ namespace sgpem private: int _total_time_elapsed; std::vector _slices; - static History* _instance; }; }//~ namespace sgpem diff --git a/src/backend/policies_gatekeeper.cc b/src/backend/policies_gatekeeper.cc index faf9479..44b4e68 100644 --- a/src/backend/policies_gatekeeper.cc +++ b/src/backend/policies_gatekeeper.cc @@ -18,10 +18,15 @@ // along with SGPEMv2; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +#include "config.h" + #include "policies_gatekeeper.hh" #include "policy_manager.hh" #include "policy.hh" +// Include full template definition only in implementation files: +#include "singleton.tcc" + #include #include @@ -31,11 +36,12 @@ using std::find; using std::runtime_error; using namespace sgpem; +// Explicit template instantiation to allow to export symbols from the DSO. +template class SG_DLLEXPORT Singleton; + typedef vector::iterator ManagerIterator; typedef map::iterator ActiveIterator; -PoliciesGatekeeper* PoliciesGatekeeper::_instance = NULL; - vector PoliciesGatekeeper::get_registered() const { @@ -131,11 +137,3 @@ PoliciesGatekeeper::deactivate_policies(PolicyManager* manager) } } -PoliciesGatekeeper& -PoliciesGatekeeper::get_instance() -{ - if(_instance == NULL) - _instance = new PoliciesGatekeeper(); - return *_instance; -} - diff --git a/src/backend/policies_gatekeeper.hh b/src/backend/policies_gatekeeper.hh index bde38d3..ccaf394 100644 --- a/src/backend/policies_gatekeeper.hh +++ b/src/backend/policies_gatekeeper.hh @@ -45,7 +45,7 @@ namespace sgpem */ - class SG_DLLEXPORT PoliciesGatekeeper /*: public Singleton*/ + class SG_DLLEXPORT PoliciesGatekeeper : public Singleton { friend class Singleton; @@ -60,8 +60,6 @@ namespace sgpem void activate_policy(History* history, Policy* policy); - static PoliciesGatekeeper& get_instance(); - private: PoliciesGatekeeper(); //private constructor. PoliciesGatekeeper(const PoliciesGatekeeper&); @@ -72,7 +70,6 @@ namespace sgpem std::vector _registered; std::map _active_policies; - static PoliciesGatekeeper* _instance; }; }//~ namespace sgpem diff --git a/src/backend/schedulable.hh b/src/backend/schedulable.hh index 40f0862..b3d3649 100644 --- a/src/backend/schedulable.hh +++ b/src/backend/schedulable.hh @@ -48,7 +48,7 @@ namespace sgpem state_terminated = 1<<4 }; - virtual ~Schedulable(); + virtual ~Schedulable() = 0; virtual Glib::ustring get_name() const = 0; diff --git a/src/backend/schedulable_queue.cc b/src/backend/schedulable_queue.cc index 2f9e3e6..88c61ee 100644 --- a/src/backend/schedulable_queue.cc +++ b/src/backend/schedulable_queue.cc @@ -20,6 +20,8 @@ #include "schedulable_queue.hh" +#include "smartp.tcc" + using namespace sgpem; using namespace std; using namespace memory; diff --git a/src/backend/schedulable_queue.hh b/src/backend/schedulable_queue.hh index 45b26c7..e59669f 100644 --- a/src/backend/schedulable_queue.hh +++ b/src/backend/schedulable_queue.hh @@ -23,10 +23,11 @@ #include "config.h" -#include - #include "dynamic_schedulable.hh" -#include "../templates/smartp.hh" + +#include "smartp.hh" + +#include namespace sgpem diff --git a/src/backend/scheduler.cc b/src/backend/scheduler.cc index eba44b8..81cdf9c 100644 --- a/src/backend/scheduler.cc +++ b/src/backend/scheduler.cc @@ -24,12 +24,16 @@ #include "policies_gatekeeper.hh" #include "user_interrupt_exception.hh" +// Do not include full template definition in the header file +#include "singleton.tcc" + #include using namespace std; using namespace sgpem; using namespace memory; -Scheduler* Scheduler::_instance = NULL; +// Explicit template instantiation to allow to export symbols from the DSO. +template class SG_DLLEXPORT Singleton; //private constructor. The parameter is discarded Scheduler::Scheduler() @@ -207,10 +211,3 @@ Scheduler::step_forward() throw(UserInterruptException) } } -Scheduler& -Scheduler::get_instance() -{ - if(_instance == NULL) - _instance = new Scheduler(); - return *_instance; -} diff --git a/src/backend/scheduler.hh b/src/backend/scheduler.hh index b97dae0..a8d179d 100644 --- a/src/backend/scheduler.hh +++ b/src/backend/scheduler.hh @@ -37,6 +37,7 @@ namespace sgpem #include "schedulable_queue.hh" #include "user_interrupt_exception.hh" +// Do not include full template definition here #include "singleton.hh" namespace sgpem @@ -54,7 +55,7 @@ namespace sgpem */ - class SG_DLLEXPORT Scheduler /*: public Singleton*/ + class SG_DLLEXPORT Scheduler : public Singleton { friend class Singleton; public: @@ -88,14 +89,10 @@ namespace sgpem */ Policy& get_policy(); - static Scheduler& get_instance(); - - private: Scheduler(); //private constructor. SchedulableQueue _ready_queue; PolicyManager& _policy_manager; - static Scheduler* _instance; }; }//~ namespace sgpem diff --git a/src/backend/static_thread.cc b/src/backend/static_thread.cc index 98daefb..47d6dc0 100644 --- a/src/backend/static_thread.cc +++ b/src/backend/static_thread.cc @@ -21,6 +21,8 @@ #include "static_thread.hh" #include "static_request.hh" +#include + using namespace sgpem; using std::vector; diff --git a/src/main.cc b/src/main.cc index 65a709a..7af5131 100644 --- a/src/main.cc +++ b/src/main.cc @@ -25,7 +25,6 @@ #include "parse_opts.hh" #include "start_gui.hh" -#include "templates/smartp.hh" #include "backend/history.hh" #include "backend/static_schedulable.hh" #include "backend/schedulable_queue.hh" @@ -38,6 +37,8 @@ #include "standard_io.hh" #include "text_simulation.hh" +#include "smartp.tcc" + #include #include diff --git a/src/simulation.cc b/src/simulation.cc index fe78179..c5762d1 100644 --- a/src/simulation.cc +++ b/src/simulation.cc @@ -20,6 +20,8 @@ #include "simulation.hh" +#include "smartp.tcc" + using namespace std; using namespace sgpem; using namespace memory; diff --git a/src/start_gui.cc b/src/start_gui.cc index 83f566b..7f9c9c6 100644 --- a/src/start_gui.cc +++ b/src/start_gui.cc @@ -21,10 +21,9 @@ #include "config.h" #include "gettext.h" - #include "graphical_terminal_io.hh" #include "start_gui.hh" -#include "templates/smartp.hh" +#include "smartp.tcc" #include diff --git a/src/templates/singleton.hh b/src/templates/singleton.hh index cd139e6..b48b519 100644 --- a/src/templates/singleton.hh +++ b/src/templates/singleton.hh @@ -47,13 +47,10 @@ namespace sgpem private: static Instantiated_class* _instance; - static Glib::StaticMutex _mutex; + static Glib::StaticMutex SG_DLLLOCAL _mutex; }; //~ class Singleton } //~ namespace sgpem - -#include "singleton.tcc" - #endif //~ SINGLETON_HH diff --git a/src/templates/smartp.hh b/src/templates/smartp.hh index d9e648b..784c833 100644 --- a/src/templates/smartp.hh +++ b/src/templates/smartp.hh @@ -85,41 +85,41 @@ namespace memory { smart_ptr& operator=(const smart_ptr& sptr) throw(); - inline bool operator==(const smart_ptr& sptr) const throw(); - inline bool operator!=(const smart_ptr& sptr) const throw(); + bool operator==(const smart_ptr& sptr) const throw(); + bool operator!=(const smart_ptr& sptr) const throw(); /** \brief Access to stored object's members * * Use this operator to access object * methods and data. */ - inline T* operator->() throw(); + T* operator->() throw(); /** \brief Access to stored object's members * * Const version of the above operator. */ - inline const T* operator->() const throw(); + const T* operator->() const throw(); /** \brief Access to stored object * * \warning Use with care */ - inline T& operator*() throw(); + T& operator*() throw(); /** \brief Access to stored object * * \warning Use with care */ - inline const T& operator*() const throw(); + const T& operator*() const throw(); /** \brief Convenience operator for use in predicates * * \return true if the stored pointer is valid, * false otherwise. */ - inline operator bool() const throw(); + operator bool() const throw(); /** \brief Returns the number of alive references to * the stored object * * \return The number of references */ - inline unsigned int alive_refs() const throw(); + unsigned int alive_refs() const throw(); /** \brief Dynamic cast the stored pointer * to another type, returning a smart_ptr @@ -133,7 +133,7 @@ namespace memory { * the cast isn't successful or doable */ template - inline smart_ptr cast_to() throw(std::bad_cast); + smart_ptr cast_to() throw(std::bad_cast); /** \brief Dynamic cast the stored pointer * to another type, returning a smart_ptr @@ -147,7 +147,7 @@ namespace memory { * the cast isn't successful or doable */ template - inline const smart_ptr cast_to() const throw(std::bad_cast); + const smart_ptr cast_to() const throw(std::bad_cast); private: template @@ -160,7 +160,5 @@ namespace memory { }; } -#include "smartp.tcc" - #endif diff --git a/src/testsuite/test-history.cc b/src/testsuite/test-history.cc index d8cd674..e65bfeb 100644 --- a/src/testsuite/test-history.cc +++ b/src/testsuite/test-history.cc @@ -38,7 +38,8 @@ #include "backend/observed_subject.hh" #include "backend/schedulable_queue.hh" #include "backend/dynamic_schedulable.hh" -#include "templates/smartp.hh" + +#include "templates/smartp.tcc" using namespace sgpem; using namespace std; diff --git a/src/testsuite/test-parse_command.cc b/src/testsuite/test-parse_command.cc index 1eccf8a..a28a897 100644 --- a/src/testsuite/test-parse_command.cc +++ b/src/testsuite/test-parse_command.cc @@ -23,7 +23,6 @@ #include "standard_io.hh" #include "text_simulation.hh" -#include "templates/smartp.hh" #include #include @@ -42,6 +41,8 @@ #include "backend/schedulable_queue.hh" #include "backend/dynamic_schedulable.hh" +#include "smartp.tcc" + namespace sgpem { diff --git a/src/testsuite/test-stepforward.cc b/src/testsuite/test-stepforward.cc index ed8bcc3..a032c4f 100644 --- a/src/testsuite/test-stepforward.cc +++ b/src/testsuite/test-stepforward.cc @@ -35,11 +35,12 @@ #include "backend/observed_subject.hh" #include "backend/schedulable_queue.hh" #include "backend/dynamic_schedulable.hh" -#include "templates/smartp.hh" #include "scheduler.hh" #include "user_interrupt_exception.hh" +#include "smartp.tcc" + #include diff --git a/src/text_simulation.cc b/src/text_simulation.cc index 2c8acf9..1af35a5 100644 --- a/src/text_simulation.cc +++ b/src/text_simulation.cc @@ -24,12 +24,14 @@ #include "backend/history.hh" #include "text_simulation.hh" + using namespace std; using namespace sgpem; using namespace memory; using Glib::Thread; using Glib::ustring; +#include "smartp.tcc" TextSimulation::~TextSimulation() { diff --git a/src/text_simulation.hh b/src/text_simulation.hh index db9cfee..a209d35 100644 --- a/src/text_simulation.hh +++ b/src/text_simulation.hh @@ -29,6 +29,7 @@ #include "templates/smartp.hh" #include "backend/policy_parameters.hh" +#include "smartp.hh" #include #include