-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;
-}
-