xbt_os_mutex_acquire(simix_global->mutex);
/* cancel non-blocking communications */
- smx_synchro_t synchro = static_cast<smx_synchro_t>(xbt_fifo_pop(process->comms));
+ smx_activity_t synchro = static_cast<smx_activity_t>(xbt_fifo_pop(process->comms));
while (synchro != nullptr) {
simgrid::kernel::activity::Comm *comm = static_cast<simgrid::kernel::activity::Comm*>(synchro);
} else {
xbt_die("Communication synchro %p is in my list but I'm not the sender nor the receiver", synchro);
}
- synchro = static_cast<smx_synchro_t>(xbt_fifo_pop(process->comms));
+ synchro = static_cast<smx_activity_t>(xbt_fifo_pop(process->comms));
}
XBT_DEBUG("%p should not be run anymore",process);
void simcall_HANDLER_process_suspend(smx_simcall_t simcall, smx_process_t process)
{
- smx_synchro_t sync_suspend = SIMIX_process_suspend(process, simcall->issuer);
+ smx_activity_t sync_suspend = SIMIX_process_suspend(process, simcall->issuer);
if (process != simcall->issuer) {
SIMIX_simcall_answer(simcall);
/* If we are suspending ourselves, then just do not finish the simcall now */
}
-smx_synchro_t SIMIX_process_suspend(smx_process_t process, smx_process_t issuer)
+smx_activity_t SIMIX_process_suspend(smx_process_t process, smx_process_t issuer)
{
if (process->suspended) {
XBT_DEBUG("Process '%s' is already suspended", process->name.c_str());
SIMIX_simcall_answer(simcall);
return;
}
- smx_synchro_t sync = SIMIX_process_join(simcall->issuer, process, timeout);
+ smx_activity_t sync = SIMIX_process_join(simcall->issuer, process, timeout);
sync->simcalls.push_back(simcall);
simcall->issuer->waiting_synchro = sync;
}
-static int SIMIX_process_join_finish(smx_process_exit_status_t status, smx_synchro_t synchro){
+static int SIMIX_process_join_finish(smx_process_exit_status_t status, smx_activity_t synchro){
simgrid::kernel::activity::Sleep *sleep = static_cast<simgrid::kernel::activity::Sleep*>(synchro);
if (sleep->surf_sleep) {
return 0;
}
-smx_synchro_t SIMIX_process_join(smx_process_t issuer, smx_process_t process, double timeout)
+smx_activity_t SIMIX_process_join(smx_process_t issuer, smx_process_t process, double timeout)
{
- smx_synchro_t res = SIMIX_process_sleep(issuer, timeout);
+ smx_activity_t res = SIMIX_process_sleep(issuer, timeout);
static_cast<simgrid::kernel::activity::ActivityImpl*>(res)->ref();
SIMIX_process_on_exit(process, (int_f_pvoid_pvoid_t)SIMIX_process_join_finish, res);
return res;
SIMIX_simcall_answer(simcall);
return;
}
- smx_synchro_t sync = SIMIX_process_sleep(simcall->issuer, duration);
+ smx_activity_t sync = SIMIX_process_sleep(simcall->issuer, duration);
sync->simcalls.push_back(simcall);
simcall->issuer->waiting_synchro = sync;
}
-smx_synchro_t SIMIX_process_sleep(smx_process_t process, double duration)
+smx_activity_t SIMIX_process_sleep(smx_process_t process, double duration)
{
sg_host_t host = process->host;
return synchro;
}
-void SIMIX_process_sleep_destroy(smx_synchro_t synchro)
+void SIMIX_process_sleep_destroy(smx_activity_t synchro)
{
XBT_DEBUG("Destroy synchro %p", synchro);
simgrid::kernel::activity::Sleep *sleep = static_cast<simgrid::kernel::activity::Sleep*>(synchro);