Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
mc_api::get_automaton_state() defined. It is called in LivenessChecker::run()
[simgrid.git] / src / s4u / s4u_Actor.cpp
index f9b427200606b88d69053c71cf9139c2c16f6e01..1fd96f938388bc3991db9e67f22f26012eade404 100644 (file)
@@ -103,12 +103,12 @@ int Actor::get_refcount() const
 
 // ***** Actor methods *****
 
-void Actor::join()
+void Actor::join() const
 {
   join(-1);
 }
 
-void Actor::join(double timeout)
+void Actor::join(double timeout) const
 {
   kernel::actor::ActorImpl* issuer = kernel::actor::ActorImpl::self();
   const kernel::actor::ActorImpl* target = pimpl_;
@@ -499,13 +499,13 @@ void sg_actor_start(sg_actor_t actor, xbt_main_func_t code, int argc, const char
   simgrid::kernel::actor::ActorCode function;
   if (code)
     function = simgrid::xbt::wrap_main(code, argc, argv);
-  actor->start(std::move(function));
+  actor->start(function);
 }
 
 sg_actor_t sg_actor_create(const char* name, sg_host_t host, xbt_main_func_t code, int argc, const char* const* argv)
 {
   simgrid::kernel::actor::ActorCode function = simgrid::xbt::wrap_main(code, argc, argv);
-  return simgrid::s4u::Actor::init(name, host)->start(std::move(function)).get();
+  return simgrid::s4u::Actor::init(name, host)->start(function).get();
 }
 
 void sg_actor_set_stacksize(sg_actor_t actor, unsigned size)
@@ -676,7 +676,7 @@ void sg_actor_migrate(sg_actor_t process, sg_host_t host) // XBT_ATTRIB_DEPRECAT
  * @param actor the actor to wait for
  * @param timeout wait until the actor is over, or the timeout expires
  */
-void sg_actor_join(sg_actor_t actor, double timeout)
+void sg_actor_join(const_sg_actor_t actor, double timeout)
 {
   actor->join(timeout);
 }