From: Martin Quinson Date: Mon, 21 Dec 2015 16:08:31 +0000 (+0100) Subject: kill unused callbacks: cpuCreated, cpuDestructed and cpuActionStateChanged X-Git-Tag: v3_13~1418 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/e9c3452d0a6bdc89e663102456eb7a8e9b085077 kill unused callbacks: cpuCreated, cpuDestructed and cpuActionStateChanged --- diff --git a/src/surf/cpu_interface.cpp b/src/surf/cpu_interface.cpp index 2f1f7df542..772e86ae3f 100644 --- a/src/surf/cpu_interface.cpp +++ b/src/surf/cpu_interface.cpp @@ -38,10 +38,8 @@ Cpu *getActionCpu(CpuAction *action) { action->getVariable(), 0))); } -simgrid::surf::signal cpuCreatedCallbacks; -simgrid::surf::signal cpuDestructedCallbacks; -simgrid::surf::signal cpuStateChangedCallbacks; simgrid::surf::signal cpuActionStateChangedCallbacks; + void cpu_add_traces(){ surf_cpu_model_pm->addTraces(); } @@ -193,7 +191,6 @@ Cpu::Cpu(Model *model, const char *name, void Cpu::onDie() { - cpuDestructedCallbacks(this); Resource::onDie(); } @@ -231,22 +228,12 @@ int Cpu::getCore() return m_core; } -void Cpu::setState(e_surf_resource_state_t state) -{ - e_surf_resource_state_t old = Resource::getState(); - Resource::setState(state); - cpuStateChangedCallbacks(this, old, state); -} - void Cpu::plug(simgrid::Host* host) { if (this->m_host != nullptr) xbt_die("Already plugged into host %s", host->id().c_str()); host->extension_set(this); this->m_host = host; - simgrid::surf::cpuCreatedCallbacks(this); - simgrid::surf::cpuStateChangedCallbacks(this, - SURF_RESOURCE_ON, this->getState()); } /********** diff --git a/src/surf/cpu_interface.hpp b/src/surf/cpu_interface.hpp index 5e4aece37b..c2faaf0ac7 100644 --- a/src/surf/cpu_interface.hpp +++ b/src/surf/cpu_interface.hpp @@ -27,24 +27,6 @@ class CpuPlugin; *************/ XBT_PUBLIC(Cpu*) getActionCpu(CpuAction *action); -/** @ingroup SURF_callbacks - * @brief Callbacks handler which emit the callbacks after Cpu creation * - * @details Callback functions have the following signature: `void(CpuPtr)` - */ -XBT_PUBLIC_DATA(simgrid::surf::signal) cpuCreatedCallbacks; - -/** @ingroup SURF_callbacks - * @brief Callbacks handler which emit the callbacks after Cpu destruction * - * @details Callback functions have the following signature: `void(CpuPtr)` - */ -XBT_PUBLIC_DATA(simgrid::surf::signal) cpuDestructedCallbacks; - -/** @ingroup SURF_callbacks - * @brief Callbacks handler which emit the callbacks after Cpu State changed * - * @details Callback functions have the following signature: `void(CpuAction *action, e_surf_resource_state_t old, e_surf_resource_state_t current)` - */ -XBT_PUBLIC_DATA(simgrid::surf::signal) cpuStateChangedCallbacks; - /** @ingroup SURF_callbacks * @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 old, e_surf_action_state_t current)` @@ -172,7 +154,6 @@ public: virtual void setPstate(int pstate_index)=0; virtual int getPstate()=0; - void setState(e_surf_resource_state_t state); void plug(simgrid::Host* host); void addTraces(void);