Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Regenerate the output captures of the gras tutorial after the numerous timing changes...
[simgrid.git] / src / simix / smx_global.c
index fc1135f..9bcb36d 100644 (file)
@@ -113,7 +113,7 @@ void SIMIX_global_init(int *argc, char **argv)
 
     simix_global = xbt_new0(s_SIMIX_Global_t, 1);
 
-    simix_global->host = xbt_fifo_new();
+    simix_global->host = xbt_dict_new();
     simix_global->process_to_run =
        xbt_swag_new(xbt_swag_offset(proc, synchro_hookup));
     simix_global->process_list =
@@ -153,7 +153,7 @@ void SIMIX_display_process_status(void)
             : ((process->simdata->suspended) ? "[SUSPENDED] " : ""));
 
     if (p_simdata->mutex) {
-      who2 = bprintf("%s Blocked on mutex %p", who, (XBT_LOG_ISENABLED(simix_kernel,xbt_log_priority_verbose))?p_simdata->mutex:(void*)0xdead);
+               who2 = bprintf("%s Blocked on mutex %p", who, (XBT_LOG_ISENABLED(simix_kernel,xbt_log_priority_verbose))?p_simdata->mutex:(void*)0xdead);
       free(who);
       who = who2;
     } else if (p_simdata->cond) {
@@ -164,7 +164,7 @@ void SIMIX_display_process_status(void)
       free(who);
       who = who2;
       xbt_fifo_foreach(p_simdata->cond->actions, item, act, smx_action_t) {
-       who2 = bprintf("%s '%s'(%p)", who, act->name,(XBT_LOG_ISENABLED(simix_kernel,xbt_log_priority_verbose))?act:(void*)0xdead);
+                 who2 = bprintf("%s '%s'(%p)", who, act->name,(XBT_LOG_ISENABLED(simix_kernel,xbt_log_priority_verbose))?act:(void*)0xdead);
        free(who);
        who = who2;
       }
@@ -278,18 +278,13 @@ void SIMIX_process_killall()
  */
 void SIMIX_clean(void)
 {
-  xbt_fifo_item_t i = NULL;
-  smx_host_t h = NULL;
   smx_process_t p = NULL;
 
   while ((p = xbt_swag_extract(simix_global->process_list))) {
     SIMIX_process_kill(p);
   }
 
-  xbt_fifo_foreach(simix_global->host, i, h, smx_host_t) {
-    __SIMIX_host_destroy(h);
-  }
-  xbt_fifo_free(simix_global->host);
+  xbt_dict_free(&(simix_global->host));
   xbt_swag_free(simix_global->process_to_run);
   xbt_swag_free(simix_global->process_list);
   xbt_dict_free(&(simix_global->registered_functions));