Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
S4U version of actor-yield example
[simgrid.git] / src / s4u / s4u_actor.cpp
index db27edc..0789eec 100644 (file)
@@ -120,11 +120,6 @@ int Actor::isSuspended()
   return simgrid::simix::kernelImmediate([this] { return pimpl_->suspended; });
 }
 
-void Actor::yield()
-{
-  simgrid::simix::kernelImmediate([] { /* do nothing*/ });
-}
-
 void Actor::setKillTime(double time) {
   simcall_process_set_kill_time(pimpl_,time);
 }
@@ -219,6 +214,11 @@ void sleep_for(double duration)
     simcall_process_sleep(duration);
 }
 
+void yield()
+{
+  simgrid::simix::kernelImmediate([] { /* do nothing*/ });
+}
+
 XBT_PUBLIC(void) sleep_until(double timeout)
 {
   double now = SIMIX_get_clock();