Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
added circle placement for ns3 wifi nodes
[simgrid.git] / teshsuite / s4u / host-on-off-actors / host-on-off-actors.cpp
index 246ceec39183252c2977bf625ff347e50b1b7a5c..8f12f850e6ac6cdab79d3904bb9b89900b8b2ac1 100644 (file)
@@ -10,7 +10,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_test, "Messages specific for this s4u example")
 
 int tasks_done = 0;
 
-static void actor_daemon()
+XBT_ATTRIB_NORETURN static void actor_daemon()
 {
   const simgrid::s4u::Host* host = simgrid::s4u::Host::current();
   XBT_INFO("  Start daemon on %s (%f)", host->get_cname(), host->get_speed());
@@ -19,13 +19,13 @@ static void actor_daemon()
     simgrid::s4u::this_actor::execute(host->get_speed());
     tasks_done++;
   }
-  XBT_INFO("  daemon done. See you!");
+  xbt_die("  daemon done. See you!");
 }
 
 static void commTX()
 {
   XBT_INFO("  Start TX");
-  std::string* payload = new std::string("COMM");
+  auto* payload = new std::string("COMM");
   simgrid::s4u::Mailbox::by_name("comm")->put_init(payload, 100000000)->detach();
   // We should wait a bit (if not the process will end before the communication, hence an exception on the other side).
   try {