X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/76da2a87ea1cf4def9fcb62ec75bbcd949c71bd5..72df752eacfe720b851c3b0451d85303a61b3bf5:/src/msg/m_process.c
diff --git a/src/msg/m_process.c b/src/msg/m_process.c
index 7507c3309d..3ecbc09eec 100644
--- a/src/msg/m_process.c
+++ b/src/msg/m_process.c
@@ -8,13 +8,14 @@
#include "private.h"
#include "xbt/sysdep.h"
#include "xbt/log.h"
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(m_process, msg,
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_process, msg,
"Logging specific to MSG (process)");
/** \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
@@ -115,7 +116,7 @@ m_process_t MSG_process_create_with_arguments(const char *name,
xbt_fifo_unshift(host->simdata->process_list, process);
- /* /////////////// FIX du current_process !!! ////////////// */
+ /* *************** FIX du current_process !!! *************** */
self = msg_global->current_process;
xbt_context_start(process->simdata->context);
msg_global->current_process = self;
@@ -353,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;
@@ -458,21 +459,19 @@ int MSG_process_is_suspended(m_process_t process)
return (process->simdata->suspended);
}
-static char blocked_name[512];
-
-int __MSG_process_block(double max_duration)
+int __MSG_process_block(double max_duration, const char *info)
{
m_process_t process = MSG_process_self();
-
m_task_t dummy = MSG_TASK_UNINITIALIZED;
- snprintf(blocked_name,512,"blocked (%s:%s)",process->name,
- process->simdata->host->name);
+ char blocked_name[512];
+ snprintf(blocked_name,512,"blocked [%s] (%s:%s)",
+ info, process->name, process->simdata->host->name);
XBT_IN1(": max_duration=%g",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);