SMX_EXCEPTION(process, cat, value, msg);
if (process->suspended)
- SIMIX_process_resume(process,SIMIX_process_self());
+ SIMIX_process_resume(process);
/* cancel the blocking synchro if any */
if (process->waiting_synchro) {
return nullptr;
} else {
- /* FIXME: computation size is zero. Is it okay that bound is zero ? */
return SIMIX_execution_start(process, "suspend", 0.0, 1.0, 0.0);
}
}
-void simcall_HANDLER_process_resume(smx_simcall_t simcall, smx_actor_t process){
- SIMIX_process_resume(process, simcall->issuer);
-}
-
-void SIMIX_process_resume(smx_actor_t process, smx_actor_t issuer)
+void SIMIX_process_resume(smx_actor_t process)
{
- XBT_IN("process = %p, issuer = %p", process, issuer);
+ XBT_IN("process = %p", process);
if(process->context->iwannadie) {
XBT_VERB("Ignoring request to suspend a process that is currently dying.");
if(!process->suspended) return;
process->suspended = 0;
- /* If we are resuming another process, resume the synchronization it was waiting for
- if any. Otherwise add it to the list of process to run in the next round. */
- if (process != issuer) {
-
- if (process->waiting_synchro) {
- process->waiting_synchro->resume();
- }
- } else XBT_WARN("Strange. Process %p is trying to resume himself.", issuer);
+ /* resume the synchronization that was blocking the resumed process. */
+ if (process->waiting_synchro)
+ process->waiting_synchro->resume();
XBT_OUT();
}