X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2b3f46a61a583459ab18cc10de139010173de685..c02558d70f9c62f9f5d04f1830be4cf16ca84bc0:/src/surf/cpu_interface.hpp diff --git a/src/surf/cpu_interface.hpp b/src/surf/cpu_interface.hpp index 380e6b733c..7a0922ad0c 100644 --- a/src/surf/cpu_interface.hpp +++ b/src/surf/cpu_interface.hpp @@ -4,8 +4,19 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ +#include + +#include +#include +#include + +#include +#include + +#include "surf/datatypes.h" #include "surf_interface.hpp" #include "maxmin_private.hpp" +#include "trace_mgr.hpp" #ifndef SURF_CPU_INTERFACE_HPP_ #define SURF_CPU_INTERFACE_HPP_ @@ -29,6 +40,7 @@ class CpuPlugin;// FIXME:DEADCODE XBT_PUBLIC_CLASS CpuModel : public Model { public: CpuModel() : Model() {}; + ~CpuModel() override; /** * @brief Create a Cpu @@ -39,9 +51,9 @@ public: */ virtual Cpu *createCpu(simgrid::s4u::Host *host, xbt_dynar_t speedPerPstate, int core)=0; - void updateActionsStateLazy(double now, double delta); - void updateActionsStateFull(double now, double delta); - bool next_occuring_event_isIdempotent() {return true;} + void updateActionsStateLazy(double now, double delta) override; + void updateActionsStateFull(double now, double delta) override; + bool next_occuring_event_isIdempotent() override; }; /************ @@ -148,9 +160,9 @@ XBT_PUBLIC_CLASS CpuAction : public simgrid::surf::Action { friend XBT_PUBLIC(Cpu*) getActionCpu(CpuAction *action); public: /** @brief Callbacks handler which emit the callbacks after CpuAction State changed * - * @details Callback functions have the following signature: `void(CpuAction *action, e_surf_action_state_t previous)` + * @details Callback functions have the following signature: `void(CpuAction *action, simgrid::surf::Action::State previous)` */ - static simgrid::xbt::signal onStateChange; + static simgrid::xbt::signal onStateChange; CpuAction(simgrid::surf::Model *model, double cost, bool failed) : Action(model, cost, failed) {} //FIXME:DEADCODE? @@ -160,11 +172,10 @@ public: /** @brief Set the affinity of the current CpuAction */ virtual void setAffinity(Cpu *cpu, unsigned long mask); - void setState(e_surf_action_state_t state); + void setState(simgrid::surf::Action::State state) override; - void updateRemainingLazy(double now); + void updateRemainingLazy(double now) override; std::list cpus(); - }; }