X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/21612e9104cb11d3a13121582d94021c1a436a22..4494760f89bc6fefad4d92e2ffe81ec5d6a1c946:/src/msg/private.h diff --git a/src/msg/private.h b/src/msg/private.h index 2f196335a8..29d30a0d6a 100644 --- a/src/msg/private.h +++ b/src/msg/private.h @@ -15,6 +15,7 @@ #include "xbt/swag.h" #include "xbt/dict.h" #include "xbt/context.h" +#include "xbt/config.h" /**************** datatypes **********************************/ @@ -54,9 +55,19 @@ typedef struct simdata_process { int argc; /* arguments number if any */ char **argv; /* arguments table if any */ MSG_error_t last_errno; /* the last value returned by a MSG_function */ - int paje_state; /* the number of state stacked with Paje */ + int paje_state; /* the number of states stacked with Paje */ } s_simdata_process_t; +typedef struct process_arg { + const char *name; + m_process_code_t code; + void *data; + m_host_t host; + int argc; + char **argv; + double kill_time; +} s_process_arg_t, *process_arg_t; + /************************** Global variables ********************************/ typedef struct MSG_Global { xbt_fifo_t host; @@ -72,6 +83,13 @@ typedef struct MSG_Global { } s_MSG_Global_t, *MSG_Global_t; extern MSG_Global_t msg_global; + +/************************** Configuration support ********************************/ +void msg_config_init(void); /* create the config set, call this before use! */ +extern int _msg_init_status; /* 0: beginning of time; + 1: pre-inited (cfg_set created); + 2: inited (running) */ +extern xbt_cfg_t _msg_cfg_set; /*************************************************************/ @@ -91,7 +109,7 @@ void __MSG_task_execute(m_process_t process, m_task_t task); MSG_error_t __MSG_wait_for_computation(m_process_t process, m_task_t task); MSG_error_t __MSG_task_wait_event(m_process_t process, m_task_t task); -MSG_error_t __MSG_process_block(void); +int __MSG_process_block(double max_duration); MSG_error_t __MSG_process_unblock(m_process_t process); int __MSG_process_isBlocked(m_process_t process);