X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/8e5b8588203716306cdbf99953d4f8202d686134..ff6b959a86792a44710aa6f5168625d3fdc7ad5f:/src/msg/m_process.c?ds=sidebyside
diff --git a/src/msg/m_process.c b/src/msg/m_process.c
index cf354393b4..a495bea1a9 100644
--- a/src/msg/m_process.c
+++ b/src/msg/m_process.c
@@ -14,7 +14,8 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(m_process, msg,
/** \defgroup m_process_management Management Functions of Agents
* \brief This section describes the agent structure of MSG
* (#m_process_t) and the functions for managing it.
- *
+ * \htmlonly \endhtmlonly
+ *
* We need to simulate many independent scheduling decisions, so
* the concept of process is at the heart of the
* simulator. A process may be defined as a code, with
@@ -113,15 +114,17 @@ m_process_t MSG_process_create_with_arguments(const char *name,
process->simdata = simdata;
process->data = data;
- xbt_fifo_push(host->simdata->process_list, process);
+ xbt_fifo_unshift(host->simdata->process_list, process);
/* /////////////// FIX du current_process !!! ////////////// */
self = msg_global->current_process;
xbt_context_start(process->simdata->context);
msg_global->current_process = self;
- xbt_fifo_push(msg_global->process_list, process);
- xbt_fifo_push(msg_global->process_to_run, process);
+ xbt_fifo_unshift(msg_global->process_list, process);
+ DEBUG2("Inserting %s(%s) in the to_run list",process->name,
+ host->name);
+ xbt_fifo_unshift(msg_global->process_to_run, process);
PAJE_PROCESS_NEW(process);
@@ -198,7 +201,7 @@ MSG_error_t MSG_process_change_host(m_process_t process, m_host_t host)
xbt_fifo_remove(simdata->host->simdata->process_list,process);
simdata->host = host;
- xbt_fifo_push(host->simdata->process_list,process);
+ xbt_fifo_unshift(host->simdata->process_list,process);
return MSG_OK;
}
@@ -351,7 +354,7 @@ MSG_error_t MSG_process_suspend(m_process_t process)
xbt_assert0(((process) && (process->simdata)), "Invalid parameters");
- PAJE_PROCESS_PUSH_STATE(process,"S");
+ PAJE_PROCESS_PUSH_STATE(process,"S",NULL);
if(process!=MSG_process_self()) {
simdata = process->simdata;
@@ -470,7 +473,7 @@ int __MSG_process_block(double max_duration)
dummy = MSG_task_create(blocked_name, 0.0, 0, NULL);
- PAJE_PROCESS_PUSH_STATE(process,"B");
+ PAJE_PROCESS_PUSH_STATE(process,"B",NULL);
process->simdata->blocked=1;
__MSG_task_execute(process,dummy);