Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
new function MSG_process_yield()
[simgrid.git] / src / msg / msg_process.cpp
index 14f9fc9..d02ae9c 100644 (file)
@@ -219,11 +219,6 @@ void MSG_process_detach()
  */
 void MSG_process_kill(msg_process_t process)
 {
  */
 void MSG_process_kill(msg_process_t process)
 {
-//  /* FIXME: why do we only cancel communication actions? is this useful? */
-//  simdata_process_t p_simdata = simcall_process_get_data(process);
-//  if (p_simdata->waiting_task && p_simdata->waiting_task->simdata->comm) {
-//    simcall_comm_cancel(p_simdata->waiting_task->simdata->comm);
-//  }
   simcall_process_kill(process);
 }
 
   simcall_process_kill(process);
 }
 
@@ -254,6 +249,12 @@ msg_error_t MSG_process_migrate(msg_process_t process, msg_host_t host)
   return MSG_OK;
 }
 
   return MSG_OK;
 }
 
+/** Yield the current actor; let the other actors execute first */
+void MSG_process_yield()
+{
+  simgrid::simix::kernelImmediate([] { /* do nothing*/ });
+}
+
 /** \ingroup m_process_management
  * \brief Returns the user data of a process.
  *
 /** \ingroup m_process_management
  * \brief Returns the user data of a process.
  *