Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
modernize two more simcalls
[simgrid.git] / src / msg / msg_process.cpp
index 2cabc47..8bbc1a7 100644 (file)
@@ -464,14 +464,15 @@ void MSG_process_on_exit(int_f_pvoid_pvoid_t fun, void *data) {
  * If the flag is set to 1, the process will be automatically restarted when its host comes back up.
  */
 XBT_PUBLIC(void) MSG_process_auto_restart_set(msg_process_t process, int auto_restart) {
-  simcall_process_auto_restart_set(process->getImpl(), auto_restart);
+  process->setAutoRestart(auto_restart);
 }
 /**
  * \ingroup m_process_management
  * \brief Restarts a process from the beginning.
  */
 XBT_PUBLIC(msg_process_t) MSG_process_restart(msg_process_t process) {
-  return simcall_process_restart(process->getImpl())->ciface();
+  return simgrid::simix::kernelImmediate(
+      [process]() { return process->getImpl()->restart(process->getImpl())->ciface(); });
 }
 
 /** @ingroup m_process_management