Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
More const.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 9 Mar 2020 08:53:11 +0000 (09:53 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 9 Mar 2020 09:15:48 +0000 (10:15 +0100)
include/simgrid/exec.h
src/s4u/s4u_Exec.cpp
teshsuite/s4u/host-on-off-actors/host-on-off-actors.cpp

index 4dee58a..6740397 100644 (file)
@@ -13,7 +13,7 @@
 SG_BEGIN_DECL
 
 XBT_PUBLIC void sg_exec_set_bound(sg_exec_t exec, double bound);
-XBT_PUBLIC const char* sg_exec_get_name(sg_exec_t exec);
+XBT_PUBLIC const char* sg_exec_get_name(const_sg_exec_t exec);
 XBT_PUBLIC void sg_exec_set_name(sg_exec_t exec, const char* name);
 XBT_PUBLIC void sg_exec_set_host(sg_exec_t exec, sg_host_t new_host);
 XBT_PUBLIC double sg_exec_get_remaining(const_sg_exec_t exec);
index 86926f8..85874d2 100644 (file)
@@ -217,7 +217,7 @@ void sg_exec_set_bound(sg_exec_t exec, double bound)
   exec->set_bound(bound);
 }
 
-const char* sg_exec_get_name(sg_exec_t exec)
+const char* sg_exec_get_name(const_sg_exec_t exec)
 {
   return exec->get_cname();
 }
index 07bc785..a651ff4 100644 (file)
@@ -12,7 +12,7 @@ int tasks_done = 0;
 
 static void actor_daemon()
 {
-  simgrid::s4u::Host* host = simgrid::s4u::Host::current();
+  const simgrid::s4u::Host* host = simgrid::s4u::Host::current();
   XBT_INFO("  Start daemon on %s (%f)", host->get_cname(), host->get_speed());
   for (;;) {
     XBT_INFO("  Execute daemon");