X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f6d1a777a2a8f217db9a266968f0fa1fcfacf314:/include/simgrid/plugins/task.hpp..74c678b8644aa28d345490294709922d4c489bf5:/include/simgrid/s4u/Task.hpp?ds=sidebyside diff --git a/include/simgrid/plugins/task.hpp b/include/simgrid/s4u/Task.hpp similarity index 93% rename from include/simgrid/plugins/task.hpp rename to include/simgrid/s4u/Task.hpp index 87a357be43..ef787347a5 100644 --- a/include/simgrid/plugins/task.hpp +++ b/include/simgrid/s4u/Task.hpp @@ -1,5 +1,5 @@ -#ifndef SIMGRID_PLUGINS_TASK_H_ -#define SIMGRID_PLUGINS_TASK_H_ +#ifndef SIMGRID_S4U_TASK_H_ +#define SIMGRID_S4U_TASK_H_ #include #include @@ -11,7 +11,7 @@ #include #include -namespace simgrid::plugins { +namespace simgrid::s4u { class Task; using TaskPtr = boost::intrusive_ptr; @@ -24,11 +24,6 @@ using CommTaskPtr = boost::intrusive_ptr; class IoTask; using IoTaskPtr = boost::intrusive_ptr; -struct ExtendedAttributeActivity { - static simgrid::xbt::Extension EXTENSION_ID; - Task* task_; -}; - class XBT_PUBLIC Token : public xbt::Extendable {}; class Task { @@ -37,7 +32,6 @@ class Task { bool ready_to_run() const; void receive(Task* source); - void complete(); protected: std::string name_; @@ -54,13 +48,13 @@ protected: explicit Task(const std::string& name); virtual ~Task() = default; virtual void fire() = 0; + void complete(); static xbt::signal on_start; static xbt::signal on_end; std::atomic_int_fast32_t refcount_{0}; public: - static void init(); const std::string& get_name() const { return name_; } const char* get_cname() const { return name_.c_str(); } void enqueue_execs(int n); @@ -145,5 +139,5 @@ public: IoTaskPtr set_op_type(s4u::Io::OpType type); s4u::Io::OpType get_op_type() const { return type_; } }; -} // namespace simgrid::plugins +} // namespace simgrid::s4u #endif