Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Cosmetics around deprecated functions.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 8 Jul 2021 19:23:25 +0000 (21:23 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 8 Jul 2021 20:27:33 +0000 (22:27 +0200)
docs/source/app_s4u.rst
examples/c/exec-basic/exec-basic.c
include/simgrid/host.h
include/simgrid/s4u/NetZone.hpp
src/kernel/actor/ActorImpl.cpp
src/s4u/s4u_Host.cpp
src/s4u/s4u_Netzone.cpp
src/xbt/dynar.cpp

index 0c755f0..c120358 100644 (file)
@@ -1617,7 +1617,7 @@ Routing data
       .. doxygenfunction:: simgrid::s4u::NetZone::add_component(kernel::routing::NetPoint *elm)
       .. doxygenfunction:: simgrid::s4u::NetZone::add_route
       .. doxygenfunction:: simgrid::s4u::NetZone::get_children() const
-      .. doxygenfunction:: simgrid::s4u::NetZone::get_father()
+      .. doxygenfunction:: simgrid::s4u::NetZone::get_parent()
 
    .. group-tab:: C
 
index d168f17..ecdf06e 100644 (file)
@@ -14,7 +14,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(exec_basic, "Messages specific for this example");
 
 static void executor(int argc, char* argv[])
 {
-  /* sg_actor_self_execute() tells SimGrid to pause the calling actor
+  /* sg_actor_execute() tells SimGrid to pause the calling actor
    * until its host has computed the amount of flops passed as a parameter */
   sg_actor_execute(98095);
   XBT_INFO("Done.");
@@ -24,7 +24,7 @@ static void executor(int argc, char* argv[])
 
 static void privileged(int argc, char* argv[])
 {
-  /* sg_actor_self_execute_with_priority() specifies that this execution gets a larger share of the resource.
+  /* sg_actor_execute_with_priority() specifies that this execution gets a larger share of the resource.
    *
    * Since the priority is 2, it computes twice as fast as a regular one.
    *
index d8ff8f4..0a872a6 100644 (file)
@@ -38,19 +38,21 @@ XBT_PUBLIC sg_host_t sg_host_by_name(const char* name);
 /** @brief Return the name of the sg_host_t. */
 XBT_PUBLIC const char* sg_host_get_name(const_sg_host_t host);
 
-#ifndef DOXYGEN
 // ========== User Data ==============
 /** @brief Return the user data of a #sg_host_t.
  *
  * This functions returns the user data associated to @a host if any.
  */
 XBT_PUBLIC void* sg_host_get_data(const_sg_host_t host);
-XBT_ATTRIB_DEPRECATED_v330("Please use sg_host_get_data()") XBT_PUBLIC void* sg_host_data(const_sg_host_t host);
+
 /** @brief Set the user data of a #sg_host_t.
  *
  * This functions attach @a data to @a host.
  */
 XBT_PUBLIC void sg_host_set_data(sg_host_t host, void* userdata);
+
+#ifndef DOXYGEN
+XBT_ATTRIB_DEPRECATED_v330("Please use sg_host_get_data()") XBT_PUBLIC void* sg_host_data(const_sg_host_t host);
 XBT_ATTRIB_DEPRECATED_v330("Please use sg_host_set_data()") XBT_PUBLIC
     void sg_host_data_set(sg_host_t host, void* userdata);
 #endif
index 47b5c9e..870f85a 100644 (file)
@@ -42,7 +42,7 @@ public:
   /** @brief Retrieves the name of that netzone as a C string */
   const char* get_cname() const;
 
-  XBT_ATTRIB_DEPRECATED_v331("Please use get_parent()") NetZone* get_father();
+  XBT_ATTRIB_DEPRECATED_v331("Please use get_parent()") NetZone* get_father() const;
   NetZone* get_parent() const;
   NetZone* set_parent(const NetZone* parent);
 
index 12b28e4..149fa63 100644 (file)
@@ -550,7 +550,7 @@ const char* SIMIX_process_self_get_name()
 }
 
 /** @brief Returns the process from PID. */
-smx_actor_t SIMIX_process_from_PID(aid_t pid)
+smx_actor_t SIMIX_process_from_PID(aid_t pid) // XBT_ATTRIB_DEPRECATD_v331
 {
   return simgrid::kernel::actor::ActorImpl::by_pid(pid);
 }
index a843737..c06d170 100644 (file)
@@ -186,17 +186,17 @@ NetZone* Host::get_englobing_zone() const
 }
 
 #ifndef DOXYGEN
-void Host::sendto(Host* dest, double byte_amount) // deprecated 331
+void Host::sendto(Host* dest, double byte_amount) // XBT_ATTRIB_DEPRECATED_v331
 {
   Comm::sendto_async(this, dest, byte_amount)->wait();
 }
 
-CommPtr Host::sendto_async(Host* dest, double byte_amount) // deprecated 331
+CommPtr Host::sendto_async(Host* dest, double byte_amount) // XBT_ATTRIB_DEPRECATED_v331
 {
   return Comm::sendto_async(this, dest, byte_amount);
 }
 
-void Host::send_to(Host* dest, double byte_amount) // deprecated 330
+void Host::send_to(Host* dest, double byte_amount) // XBT_ATTRIB_DEPRECATED_v330
 {
   Comm::sendto(this, dest, byte_amount);
 }
index 4ca7bd7..086e1ad 100644 (file)
@@ -48,7 +48,7 @@ std::vector<NetZone*> NetZone::get_children() const
   return res;
 }
 
-NetZone* NetZone::add_child(NetZone* new_zone)
+NetZone* NetZone::add_child(NetZone* new_zone) // XBT_ATTRIB_DEPRECATED_v332
 {
   new_zone->set_parent(this);
   return this;
@@ -64,7 +64,7 @@ const char* NetZone::get_cname() const
   return pimpl_->get_cname();
 }
 
-NetZone* NetZone::get_father()
+NetZone* NetZone::get_father() const // XBT_ATTRIB_DEPRECATED_v331
 {
   return pimpl_->get_parent()->get_iface();
 }
index 2cf9593..1a4424f 100644 (file)
@@ -420,7 +420,7 @@ void xbt_dynar_sort(const_xbt_dynar_t dynar, int_f_cpvoid_cpvoid_t compar_fn)
  *
  *  Note: The dynar won't be usable afterwards.
  */
-void* xbt_dynar_to_array(xbt_dynar_t dynar)
+void* xbt_dynar_to_array(xbt_dynar_t dynar) // XBT_ATTRIB_DEPRECATED_v331
 {
   void* res;
   xbt_dynar_shrink(dynar, 1);