summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
2e43b2f)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6301
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
[Bug: if MSG_task_get_sender() is called after sender exit,
bad things happen]
* Fix a bug which prevented suspend/resume to work properly
[Bug: if MSG_task_get_sender() is called after sender exit,
bad things happen]
* Fix a bug which prevented suspend/resume to work properly
+ * Display the status of simulated processes when receiving SIGINT
+ This fixes a regression of v3.3. due to the introduction of SIMIX
SIMIX:
* Add SIMIX_process_set_name() to change the name of the current
SIMIX:
* Add SIMIX_process_set_name() to change the name of the current
return msg_global->max_channel;
}
return msg_global->max_channel;
}
-void __MSG_display_process_status(void)
-{
-}
-
-
-/* FIXME: Yeah, I'll do it in a portable maner one day [Mt] */
-#include <signal.h>
-
-static void _XBT_CALL inthandler(int ignored)
-{
- INFO0("CTRL-C pressed. Displaying status and bailing out");
- __MSG_display_process_status();
- exit(1);
-}
-
/** \ingroup msg_simulation
* \brief Launch the MSG simulation
*/
/** \ingroup msg_simulation
* \brief Launch the MSG simulation
*/
xbt_fifo_t actions_done = xbt_fifo_new();
xbt_fifo_t actions_failed = xbt_fifo_new();
xbt_fifo_t actions_done = xbt_fifo_new();
xbt_fifo_t actions_failed = xbt_fifo_new();
- /* Prepare to display some more info when dying on Ctrl-C pressing */
- signal(SIGINT, inthandler);
-
/* Clean IO before the run */
fflush(stdout);
fflush(stderr);
/* Clean IO before the run */
fflush(stdout);
fflush(stderr);
+/* FIXME: Yeah, I'll do it in a portable maner one day [Mt] */
+#include <signal.h>
+
+static void _XBT_CALL inthandler(int ignored)
+{
+ INFO0("CTRL-C pressed. Displaying status and bailing out");
+ SIMIX_display_process_status();
+ exit(1);
+}
+
+
/**
* \brief Initialize some SIMIX internal data.
*
/**
* \brief Initialize some SIMIX internal data.
*
xbt_swag_new(xbt_swag_offset(proc, process_hookup));
simix_global->current_process = NULL;
simix_global->registered_functions = xbt_dict_new();
xbt_swag_new(xbt_swag_offset(proc, process_hookup));
simix_global->current_process = NULL;
simix_global->registered_functions = xbt_dict_new();
simix_global->create_process_function = NULL;
simix_global->kill_process_function = NULL;
simix_global->cleanup_process_function = SIMIX_process_cleanup;
simix_global->create_process_function = NULL;
simix_global->kill_process_function = NULL;
simix_global->cleanup_process_function = SIMIX_process_cleanup;
+
+ /* Prepare to display some more info when dying on Ctrl-C pressing */
+ signal(SIGINT, inthandler);
-/* FIXME: Yeah, I'll do it in a portable maner one day [Mt] */
-#include <signal.h>
-
-static void _XBT_CALL inthandler(int ignored)
-{
- INFO0("CTRL-C pressed. Displaying status and bailing out");
- SIMIX_display_process_status();
- exit(1);
-}
/**
* \brief Launch the SIMIX simulation, debug purpose
/**
* \brief Launch the SIMIX simulation, debug purpose
xbt_fifo_t actions_done = xbt_fifo_new();
xbt_fifo_t actions_failed = xbt_fifo_new();
xbt_fifo_t actions_done = xbt_fifo_new();
xbt_fifo_t actions_failed = xbt_fifo_new();
- /* Prepare to display some more info when dying on Ctrl-C pressing */
- signal(SIGINT, inthandler);
-
/* Clean IO before the run */
fflush(stdout);
fflush(stderr);
/* Clean IO before the run */
fflush(stdout);
fflush(stderr);
* \brief Clean the SIMIX simulation
*
* This functions remove all memories needed to the SIMIX execution
* \brief Clean the SIMIX simulation
*
* This functions remove all memories needed to the SIMIX execution
simix_config_finalize();
free(simix_global);
simix_global = NULL;
simix_config_finalize();
free(simix_global);
simix_global = NULL;
- * \brief Finish the simulation initialization
- *
+ * \brief Finish the simulation initialization
+ *
* Must be called before the first call to SIMIX_solve()
*/
void SIMIX_init(void) {
* Must be called before the first call to SIMIX_solve()
*/
void SIMIX_init(void) {
/**
* \brief Does a turn of the simulation
*
/**
* \brief Does a turn of the simulation
*
- * Executes a step in the surf simulation, adding to the two lists all the actions that finished on this turn. Schedules all processus in the process_to_run list.
+ * Executes a step in the surf simulation, adding to the two lists all the actions that finished on this turn. Schedules all processus in the process_to_run list.
* \param actions_done List of actions done
* \param actions_failed List of actions failed
* \return The time spent to execute the simulation or -1 if the simulation ended
* \param actions_done List of actions done
* \param actions_failed List of actions failed
* \return The time spent to execute the simulation or -1 if the simulation ended
if (xbt_swag_size(simix_global->process_to_run) && (elapsed_time > 0)) {
DEBUG0("**************************************************");
}
if (xbt_swag_size(simix_global->process_to_run) && (elapsed_time > 0)) {
DEBUG0("**************************************************");
}
while ((process = xbt_swag_extract(simix_global->process_to_run))) {
DEBUG2("Scheduling %s on %s",
process->name, process->simdata->smx_host->name);
while ((process = xbt_swag_extract(simix_global->process_to_run))) {
DEBUG2("Scheduling %s on %s",
process->name, process->simdata->smx_host->name);