A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
argument why parallel execution don't jeopardize reproducibility even if we never...
[simgrid.git]
/
src
/
simix
/
smx_process.c
diff --git
a/src/simix/smx_process.c
b/src/simix/smx_process.c
index
31e46e6
..
aa1378a
100644
(file)
--- a/
src/simix/smx_process.c
+++ b/
src/simix/smx_process.c
@@
-169,7
+169,7
@@
smx_process_t SIMIX_process_create_from_wrapper(smx_process_arg_t args) {
*
* This function actually creates the process.
* It may be called when a SIMCALL_PROCESS_CREATE simcall occurs,
*
* This function actually creates the process.
* It may be called when a SIMCALL_PROCESS_CREATE simcall occurs,
- * or directly for SIMIX internal purposes.
+ * or directly for SIMIX internal purposes.
The sure thing is that it's called from maestro context.
*
* \return the process created
*/
*
* \return the process created
*/
@@
-384,6
+384,10
@@
smx_action_t SIMIX_process_suspend(smx_process_t process, smx_process_t issuer)
SIMIX_process_sleep_suspend(process->waiting_action);
break;
SIMIX_process_sleep_suspend(process->waiting_action);
break;
+ case SIMIX_ACTION_SYNCHRO:
+ /* Suspension is delayed to when the process is rescheduled. */
+ break;
+
default:
xbt_die("Internal error in SIMIX_process_suspend: unexpected action type %d",
(int)process->waiting_action->type);
default:
xbt_die("Internal error in SIMIX_process_suspend: unexpected action type %d",
(int)process->waiting_action->type);
@@
-404,8
+408,10
@@
void SIMIX_process_resume(smx_process_t process, smx_process_t issuer)
XBT_IN("process = %p, issuer = %p", process, issuer);
XBT_IN("process = %p, issuer = %p", process, issuer);
- if(process->context->iwannadie)
+ if(process->context->iwannadie) {
+ XBT_VERB("Ignoring request to suspend a process that is currently dying.");
return;
return;
+ }
if(!process->suspended) return;
process->suspended = 0;
if(!process->suspended) return;
process->suspended = 0;
@@
-431,14
+437,18
@@
void SIMIX_process_resume(smx_process_t process, smx_process_t issuer)
SIMIX_process_sleep_resume(process->waiting_action);
break;
SIMIX_process_sleep_resume(process->waiting_action);
break;
+ case SIMIX_ACTION_SYNCHRO:
+ /* I cannot resume it now. This is delayed to when the process is rescheduled at
+ * the end of the synchro. */
+ break;
+
default:
xbt_die("Internal error in SIMIX_process_resume: unexpected action type %d",
(int)process->waiting_action->type);
}
}
default:
xbt_die("Internal error in SIMIX_process_resume: unexpected action type %d",
(int)process->waiting_action->type);
}
}
- else
- XBT_WARN("Strange. Process %p is trying to resume himself.", issuer);
- }
+ } else XBT_WARN("Strange. Process %p is trying to resume himself.", issuer);
+
XBT_OUT();
}
XBT_OUT();
}