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
Solve white space conflicts
[simgrid.git]
/
src
/
simix
/
smx_process.c
diff --git
a/src/simix/smx_process.c
b/src/simix/smx_process.c
index
31d822a
..
b9d8f8d
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
*/
@@
-206,7
+206,7
@@
void SIMIX_process_create(smx_process_t *process,
XBT_VERB("Create context %s", (*process)->name);
(*process)->context = SIMIX_context_new(code, argc, argv,
XBT_VERB("Create context %s", (*process)->name);
(*process)->context = SIMIX_context_new(code, argc, argv,
-
simix_global->cleanup_process_function, *process);
+ simix_global->cleanup_process_function, *process);
(*process)->running_ctx = xbt_new(xbt_running_ctx_t, 1);
XBT_RUNNING_CTX_INITIALIZE((*process)->running_ctx);
(*process)->running_ctx = xbt_new(xbt_running_ctx_t, 1);
XBT_RUNNING_CTX_INITIALIZE((*process)->running_ctx);
@@
-286,13
+286,13
@@
void SIMIX_process_kill(smx_process_t process) {
break;
case SIMIX_ACTION_SLEEP:
break;
case SIMIX_ACTION_SLEEP:
-
SIMIX_process_sleep_destroy(process->waiting_action);
-
break;
+ SIMIX_process_sleep_destroy(process->waiting_action);
+ break;
case SIMIX_ACTION_SYNCHRO:
case SIMIX_ACTION_SYNCHRO:
-
SIMIX_synchro_stop_waiting(process, &process->simcall);
-
SIMIX_synchro_destroy(process->waiting_action);
-
break;
+ SIMIX_synchro_stop_waiting(process, &process->simcall);
+ SIMIX_synchro_destroy(process->waiting_action);
+ break;
case SIMIX_ACTION_IO:
SIMIX_io_destroy(process->waiting_action);
case SIMIX_ACTION_IO:
SIMIX_io_destroy(process->waiting_action);
@@
-323,7
+323,7
@@
void SIMIX_process_killall(smx_process_t issuer)
}
void SIMIX_process_change_host(smx_process_t process,
}
void SIMIX_process_change_host(smx_process_t process,
-
smx_host_t dest)
+ smx_host_t dest)
{
xbt_assert((process != NULL), "Invalid parameters");
xbt_swag_remove(process, process->smx_host->process_list);
{
xbt_assert((process != NULL), "Invalid parameters");
xbt_swag_remove(process, process->smx_host->process_list);
@@
-408,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;
@@
-691,13
+693,13
@@
xbt_dynar_t SIMIX_process_get_runnable(void)
*/
smx_process_t SIMIX_process_from_PID(int PID)
{
*/
smx_process_t SIMIX_process_from_PID(int PID)
{
-
smx_process_t proc;
-
xbt_swag_foreach(proc, simix_global->process_list)
-
{
-
if(proc->pid == PID)
-
return proc;
-
}
-
return NULL;
+ smx_process_t proc;
+ xbt_swag_foreach(proc, simix_global->process_list)
+ {
+ if(proc->pid == PID)
+ return proc;
+ }
+ return NULL;
}
/** @brief returns a dynar containg all currently existing processes */
}
/** @brief returns a dynar containg all currently existing processes */