Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of framagit.org:Adrien.Gougeon/simgrid into master
[simgrid.git] / teshsuite / s4u / actor-suspend / actor-suspend.cpp
index b34d160df1361064f0338c09f9710b885574bc46..14bf657f9b3f1c82eb7c88ed24fcc07964bc535f 100644 (file)
@@ -18,7 +18,7 @@ simgrid::s4u::ActorPtr receiver;
 
 class Receiver {
 public:
-  void operator()()
+  void operator()() const
   {
     XBT_INFO("Starting.");
     auto mailbox = simgrid::s4u::Mailbox::by_name("receiver");
@@ -29,7 +29,7 @@ public:
 
 class Suspender {
 public:
-  void operator()()
+  void operator()() const
   {
     XBT_INFO("Suspend the receiver...");
     receiver->suspend();
@@ -50,7 +50,7 @@ public:
 
 int main(int argc, char** argv)
 {
-  simgrid::s4u::Engine* engine = new simgrid::s4u::Engine(&argc, argv);
+  const simgrid::s4u::Engine* engine = new simgrid::s4u::Engine(&argc, argv);
 
   engine->load_platform(argv[1]);
   simgrid::s4u::Host* host = simgrid::s4u::Host::by_name("Tremblay");