Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
s4u::Actor::execute() dont need to return a state
authorMartin Quinson <martin.quinson@loria.fr>
Thu, 6 Jul 2017 08:54:06 +0000 (10:54 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Thu, 6 Jul 2017 08:54:13 +0000 (10:54 +0200)
It could be used to say if the host failed during that execution, but
the actor would be killed on such failure anyway. So it can only
return "no problem". Not that useful.

include/simgrid/s4u/Actor.hpp
src/s4u/s4u_actor.cpp

index 960118c..4d94896 100644 (file)
@@ -300,7 +300,7 @@ template <class Rep, class Period> inline void sleep_for(std::chrono::duration<R
   }
 
   /** Block the actor, computing the given amount of flops */
   }
 
   /** Block the actor, computing the given amount of flops */
-  XBT_PUBLIC(e_smx_state_t) execute(double flop);
+  XBT_PUBLIC(void) execute(double flop);
 
   /** Block the actor until it gets a message from the given mailbox.
    *
 
   /** Block the actor until it gets a message from the given mailbox.
    *
index b8c5c27..3d8a38e 100644 (file)
@@ -216,9 +216,10 @@ XBT_PUBLIC(void) sleep_until(double timeout)
     simcall_process_sleep(timeout - now);
 }
 
     simcall_process_sleep(timeout - now);
 }
 
-e_smx_state_t execute(double flops) {
+void execute(double flops)
+{
   smx_activity_t s = simcall_execution_start(nullptr,flops,1.0/*priority*/,0./*bound*/);
   smx_activity_t s = simcall_execution_start(nullptr,flops,1.0/*priority*/,0./*bound*/);
-  return simcall_execution_wait(s);
+  simcall_execution_wait(s);
 }
 
 void* recv(MailboxPtr chan) {
 }
 
 void* recv(MailboxPtr chan) {