Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
mc: some snake_casing on the way
[simgrid.git] / examples / s4u / actor-suspend / s4u-actor-suspend.cpp
index 8375c01..3e1a93e 100644 (file)
@@ -36,7 +36,10 @@ static void dream_master()
   XBT_INFO("Let's wait a little bit...");
   simgrid::s4u::this_actor::sleep_for(10); /* - Wait for 10 seconds */
   XBT_INFO("Let's wake the lazy guy up! >:) BOOOOOUUUHHH!!!!");
-  lazy->resume(); /* - Then wake up the lazy_guy */
+  if (lazy->is_suspended())
+    lazy->resume(); /* - Then wake up the lazy_guy */
+  else
+    XBT_ERROR("I was thinking that the lazy guy would be suspended now");
 
   simgrid::s4u::this_actor::sleep_for(5); /* Repeat two times: */
   XBT_INFO("Suspend the lazy guy while he's sleeping...");
@@ -67,7 +70,7 @@ static void dream_master()
 int main(int argc, char* argv[])
 {
   simgrid::s4u::Engine e(&argc, argv);
-  xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s msg_platform.xml\n", argv[0], argv[0]);
+  xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s ../platforms/small_platform.xml\n", argv[0], argv[0]);
 
   e.load_platform(argv[1]); /* - Load the platform description */
   std::vector<simgrid::s4u::Host*> list = e.get_all_hosts();