]> AND Public Git Repository - simgrid.git/blobdiff - teshsuite/simix/stack-overflow/stack-overflow.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] Replace redundant type with "auto" (teshsuite/).
[simgrid.git] / teshsuite / simix / stack-overflow / stack-overflow.cpp
index 0c1928392107dad2b1841647168ad8525753f113..ccab36f698da4ea82526fb79d07dc019e0661f7b 100644 (file)
@@ -1,13 +1,13 @@
 /* stack_overflow -- simple program generating a stack overflow             */
 
-/* Copyright (c) 2014-2018. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2014-2020. 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. */
 
-#include "simgrid/simix.hpp"
+#include "simgrid/s4u/Actor.hpp"
+#include "simgrid/s4u/Engine.hpp"
 #include "xbt/log.h"
-#include <simgrid/engine.h>
 
 #include <string>
 
@@ -41,13 +41,13 @@ static void master()
 
 int main(int argc, char* argv[])
 {
-  SIMIX_global_init(&argc, argv);
+  simgrid::s4u::Engine e(&argc, argv);
 
   xbt_assert(argc == 2, "Usage: %s platform.xml\n", argv[0]);
 
-  simgrid_load_platform(argv[1]);
-  simcall_process_create("master", master, NULL, sg_host_by_name("Tremblay"), NULL);
-  SIMIX_run();
+  e.load_platform(argv[1]);
+  simgrid::s4u::Actor::create("master", e.host_by_name("Tremblay"), master);
+  e.run();
 
   return 0;
 }