-
- smx_actor_t process = SIMIX_process_self();
- if (process == nullptr || process == simix_global->maestro_process)
- return "maestro";
-
- return process->get_cname();
-}
-
-void simcall_HANDLER_process_join(smx_simcall_t simcall, smx_actor_t process, double timeout)
-{
- if (process->finished_) {
- // The joined process is already finished, just wake up the issuer process right away
- simcall_process_sleep__set__result(simcall, SIMIX_DONE);
- SIMIX_simcall_answer(simcall);
- return;
- }
- smx_activity_t sync = simcall->issuer->join(process, timeout);
- sync->simcalls_.push_back(simcall);
- simcall->issuer->waiting_synchro = sync;
-}
-
-void simcall_HANDLER_process_sleep(smx_simcall_t simcall, double duration)
-{
- if (MC_is_active() || MC_record_replay_is_active()) {
- MC_process_clock_add(simcall->issuer, duration);
- simcall_process_sleep__set__result(simcall, SIMIX_DONE);
- SIMIX_simcall_answer(simcall);
- return;
- }
- smx_activity_t sync = simcall->issuer->sleep(duration);
- sync->simcalls_.push_back(simcall);
- simcall->issuer->waiting_synchro = sync;
-}
-
-/**
- * @brief Calling this function makes the process to yield.
- *
- * Only the current process can call this function, giving back the control to maestro.
- *
- * @param self the current process
- */
-
-/** @brief Returns the list of processes to run.
- * @deprecated
- */
-const std::vector<smx_actor_t>& simgrid::simix::process_get_runnable()
-{
- return simix_global->actors_to_run;