X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0f5e8daaa6e9f74521068aa75837200bcd182ea6..51dcb8e712855f3cb16800ddea745ef6fc8d79e9:/src/surf/surf_model.c?ds=sidebyside diff --git a/src/surf/surf_model.c b/src/surf/surf_model.c index cfe7d57ace..da1bdd776e 100644 --- a/src/surf/surf_model.c +++ b/src/surf/surf_model.c @@ -16,6 +16,7 @@ static void void_die_impossible_paction(surf_action_t action) static int int_die_impossible_paction(surf_action_t action) { DIE_IMPOSSIBLE; + return -1; } /** @brief initialize common datastructures to all models */ @@ -34,7 +35,6 @@ surf_model_t surf_model_init(void) xbt_swag_new(xbt_swag_offset(action, state_hookup)); model->states.done_action_set = xbt_swag_new(xbt_swag_offset(action, state_hookup)); - model->resource_set = xbt_dict_new(); model->action_unref = int_die_impossible_paction; model->action_cancel = void_die_impossible_paction; @@ -46,6 +46,10 @@ surf_model_t surf_model_init(void) model->action_get_finish_time = surf_action_get_finish_time; model->action_data_set = surf_action_data_set; + model->model_private->modified_set = NULL; + model->model_private->action_heap = NULL; + model->model_private->update_mechanism = UM_UNDEFINED; + model->model_private->selective_update = 0; return model; } @@ -57,12 +61,6 @@ void surf_model_exit(surf_model_t model) xbt_swag_free(model->states.running_action_set); xbt_swag_free(model->states.failed_action_set); xbt_swag_free(model->states.done_action_set); - xbt_dict_free(&model->resource_set); free(model->model_private); free(model); } - -void *surf_model_resource_by_name(surf_model_t model, const char *name) -{ - return xbt_dict_get_or_null(model->resource_set, name); -}