X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/5048f46cf78786f14cd4187bcfef187ffb32efab..ccf671a80a47f0489c33fb1dc2a8aadfc28b5b88:/src/msg/msg_private.hpp?ds=sidebyside diff --git a/src/msg/msg_private.hpp b/src/msg/msg_private.hpp index 9c5095f421..d87469cb3a 100644 --- a/src/msg/msg_private.hpp +++ b/src/msg/msg_private.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2004-2019. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2004-2021. 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. */ @@ -16,13 +16,16 @@ /**************** datatypes **********************************/ namespace simgrid { + +extern template class XBT_PUBLIC xbt::Extendable; + namespace msg { class Task : public xbt::Extendable { std::string name_ = ""; std::string tracing_category_ = ""; long long int id_; - double timeout_ = 0.0; + double timeout_ = -1; /* Default timeout is infinite */ double priority_ = 1.0; double bound_ = 0.0; /* Capping for CPU resource, or 0 for no capping */ double rate_ = -1; /* Capping for network resource, or -1 for no capping*/ @@ -56,11 +59,9 @@ public: const std::string& get_name() const { return name_; } const char* get_cname() const { return name_.c_str(); } void set_name(const char* new_name) { name_ = std::string(new_name); } - void set_tracing_category(const char* category) { tracing_category_ = category ? std::string(category) : ""; } + void set_tracing_category(const char* category) { tracing_category_ = category ? category : ""; } const std::string& get_tracing_category() const { return tracing_category_; } bool has_tracing_category() { return not tracing_category_.empty(); } - XBT_ATTRIB_DEPRECATED_v329("Please use set_data()") void* get_user_data() { return get_data(); } - XBT_ATTRIB_DEPRECATED_v329("Please use get_data()") void set_user_data(void* data) { set_data(data); } long long int get_id() const { return id_; } double get_priority() const { return priority_; } void set_priority(double priority);