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
SURF won't try to bring this process to life anymore.
[simgrid.git]
/
src
/
msg
/
m_process.c
diff --git
a/src/msg/m_process.c
b/src/msg/m_process.c
index
d3eb7f9
..
2131afa
100644
(file)
--- a/
src/msg/m_process.c
+++ b/
src/msg/m_process.c
@@
-27,7
+27,7
@@
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(m_process, msg,
* \brief Creates and runs a new #m_process_t.
*
* Does exactly the same as #MSG_process_create_with_arguments but without
* \brief Creates and runs a new #m_process_t.
*
* Does exactly the same as #MSG_process_create_with_arguments but without
- providing standard arguments (\a argc, \a argv).
+ providing standard arguments (\a argc, \a argv
, \a start_time, \a kill_time
).
* \sa MSG_process_create_with_arguments
*/
m_process_t MSG_process_create(const char *name,
* \sa MSG_process_create_with_arguments
*/
m_process_t MSG_process_create(const char *name,
@@
-136,6
+136,8
@@
void MSG_process_kill(m_process_t process)
int i;
simdata_process_t p_simdata = process->simdata;
simdata_host_t h_simdata= p_simdata->host->simdata;
int i;
simdata_process_t p_simdata = process->simdata;
simdata_host_t h_simdata= p_simdata->host->simdata;
+ int _cursor;
+ m_process_t proc = NULL;
/* fprintf(stderr,"Killing %s(%d) on %s.\n",process->name, */
/* p_simdata->PID,p_simdata->host->name); */
/* fprintf(stderr,"Killing %s(%d) on %s.\n",process->name, */
/* p_simdata->PID,p_simdata->host->name); */
@@
-148,6
+150,10
@@
void MSG_process_kill(m_process_t process)
}
if (i==msg_global->max_channel) {
if(p_simdata->waiting_task) {
}
if (i==msg_global->max_channel) {
if(p_simdata->waiting_task) {
+ xbt_dynar_foreach(p_simdata->waiting_task->simdata->sleeping,_cursor,proc) {
+ if(proc==process)
+ xbt_dynar_remove_at(p_simdata->waiting_task->simdata->sleeping,_cursor,&proc);
+ }
if(p_simdata->waiting_task->simdata->compute)
surf_workstation_resource->common_public->
action_free(p_simdata->waiting_task->simdata->compute);
if(p_simdata->waiting_task->simdata->compute)
surf_workstation_resource->common_public->
action_free(p_simdata->waiting_task->simdata->compute);
@@
-155,12
+161,17
@@
void MSG_process_kill(m_process_t process)
surf_workstation_resource->common_public->
action_change_state(p_simdata->waiting_task->simdata->comm,SURF_ACTION_FAILED);
else
surf_workstation_resource->common_public->
action_change_state(p_simdata->waiting_task->simdata->comm,SURF_ACTION_FAILED);
else
-
fprintf(stderr,"UNKNOWN STATUS. Please report this bug.\n
");
+
CRITICAL0("UNKNOWN STATUS. Please report this bug.
");
} else { /* Must be trying to put a task somewhere */
} else { /* Must be trying to put a task somewhere */
- fprintf(stderr,"UNKNOWN STATUS. Please report this bug.\n");
+ if(process==MSG_process_self()) {
+ return;
+ } else {
+ CRITICAL0("UNKNOWN STATUS. Please report this bug.");
+ }
}
}
}
}
+ xbt_fifo_remove(msg_global->process_to_run,process);
xbt_fifo_remove(msg_global->process_list,process);
xbt_context_free(process->simdata->context);
}
xbt_fifo_remove(msg_global->process_list,process);
xbt_context_free(process->simdata->context);
}
@@
-482,12
+493,3
@@
int __MSG_process_isBlocked(m_process_t process)
return (process->simdata->blocked);
}
return (process->simdata->blocked);
}
-
-
-const char* xbt_procname(void) {
- m_process_t process = MSG_process_self();
- if ((process != NULL) && (process->simdata))
- return MSG_process_get_name(process);
- else
- return "";
-}