X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/cd0ade175207a4098cba4d7ce3183f45c0a9775c..596e36117322c22fd31372e7803bc197bcd4a016:/src/kernel/resource/CpuImpl.hpp diff --git a/src/kernel/resource/CpuImpl.hpp b/src/kernel/resource/CpuImpl.hpp index efa4296acb..ae35bd5ba9 100644 --- a/src/kernel/resource/CpuImpl.hpp +++ b/src/kernel/resource/CpuImpl.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2004-2022. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2004-2023. The SimGrid Team. All rights reserved. */ /* 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. */ @@ -10,6 +10,7 @@ #include "simgrid/s4u/Host.hpp" #include "src/kernel/lmm/maxmin.hpp" #include "src/kernel/resource/Resource.hpp" +#include "xbt/ex.h" #include @@ -77,7 +78,9 @@ public: CpuImpl* set_core_count(int core_count); virtual int get_core_count() const { return core_count_; } - bool is_used() const { return true; } + void turn_off() override; + + bool is_used() const override { return true; } void seal() override; @@ -170,25 +173,17 @@ protected: * Action * **********/ -/** @ingroup SURF_cpu_interface +/** @ingroup Model_cpu_interface * @brief A CpuAction represents the execution of code on one or several Cpus */ class XBT_PUBLIC CpuAction : public Action { public: using Action::Action; - /** @brief Signal emitted when the action state changes (ready/running/done, etc) - * Signature: `void(CpuAction const& action, simgrid::kernel::resource::Action::State previous)` - */ - static xbt::signal on_state_change; - void set_state(Action::State state) override; void update_remains_lazy(double now) override; std::list cpus() const; - - void suspend() override; - void resume() override; }; } // namespace simgrid::kernel::resource