X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d7417d92e963c0d6ed8443454a56c85a3728d214..f57edc1d5b4f497883b451fc85d2d653d27a8247:/src/surf/surf_model.c diff --git a/src/surf/surf_model.c b/src/surf/surf_model.c index 2e9700e1aa..028b732e67 100644 --- a/src/surf/surf_model.c +++ b/src/surf/surf_model.c @@ -1,5 +1,6 @@ -/* Copyright (c) 2009 The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2009, 2010. The SimGrid Team. + * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -26,14 +27,13 @@ surf_model_t surf_model_init(void) model->model_private = xbt_new0(s_surf_model_private_t, 1); model->states.ready_action_set = - xbt_swag_new(xbt_swag_offset(action, state_hookup)); + xbt_swag_new(xbt_swag_offset(action, state_hookup)); model->states.running_action_set = - xbt_swag_new(xbt_swag_offset(action, state_hookup)); + xbt_swag_new(xbt_swag_offset(action, state_hookup)); model->states.failed_action_set = - xbt_swag_new(xbt_swag_offset(action, state_hookup)); + 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(); + xbt_swag_new(xbt_swag_offset(action, state_hookup)); model->action_unref = int_die_impossible_paction; model->action_cancel = void_die_impossible_paction; @@ -48,6 +48,7 @@ surf_model_t surf_model_init(void) return model; } + /** @brief finalize common datastructures to all models */ void surf_model_exit(surf_model_t model) { @@ -55,14 +56,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); -} - -