X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/38fad1a54be8df52b153c7f9ca4c40ced5dba8c9..a66bb361bd220a821b4f65bead824e459aa387aa:/src/surf/surf.c diff --git a/src/surf/surf.c b/src/surf/surf.c index 30bdc887fd..154ce3df76 100644 --- a/src/surf/surf.c +++ b/src/surf/surf.c @@ -8,6 +8,9 @@ #include "surf_private.h" #include "xbt/module.h" +XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_main, surf, + "Logging specific to the SURF maxmin module"); + typedef struct surf_resource_object { surf_resource_t resource; } s_surf_resource_object_t, *surf_resource_object_t; @@ -18,6 +21,14 @@ xbt_dynar_t resource_list = NULL; tmgr_history_t history = NULL; lmm_system_t maxmin_system = NULL; xbt_dynar_t surf_path = NULL; +const char *surf_action_state_names[6] = { + "SURF_ACTION_READY", + "SURF_ACTION_RUNNING", + "SURF_ACTION_FAILED", + "SURF_ACTION_DONE", + "SURF_ACTION_TO_FREE", + "SURF_ACTION_NOT_IN_THE_SYSTEM" +}; double generic_maxmin_share_resources(xbt_swag_t running_actions, size_t offset) @@ -98,7 +109,7 @@ void surf_action_change_state(surf_action_t action, { surf_action_state_t action_state = &(action->resource_type->common_public->states); - + XBT_IN2("(%p,%s)", action, surf_action_state_names[state]); xbt_swag_remove(action, action->state_set); if (state == SURF_ACTION_READY) @@ -114,6 +125,7 @@ void surf_action_change_state(surf_action_t action, if (action->state_set) xbt_swag_insert(action, action->state_set); + XBT_OUT; } void surf_action_set_data(surf_action_t action,