X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/3306173adf8a11cb32a60a7636181a230a7104ee..f4ae32c676421a6cd5c076b273dd7a07f2695957:/src/surf/network_constant.c diff --git a/src/surf/network_constant.c b/src/surf/network_constant.c index f98d4808b2..1f06f331dd 100644 --- a/src/surf/network_constant.c +++ b/src/surf/network_constant.c @@ -102,8 +102,8 @@ static int resource_used(void *resource_id) static int action_free(surf_action_t action) { - action->using--; - if (!action->using) { + action->refcount --; + if (!action->refcount ) { xbt_swag_remove(action, action->state_set); free(action); return 1; @@ -113,7 +113,7 @@ static int action_free(surf_action_t action) static void action_use(surf_action_t action) { - action->using++; + action->refcount ++; } static void action_cancel(surf_action_t action) @@ -203,7 +203,7 @@ static surf_action_t communicate(void *src, void *dst, double size, action = xbt_new0(s_surf_action_network_Constant_t, 1); - action->generic_action.using = 1; + action->generic_action.refcount = 1; action->generic_action.cost = size; action->generic_action.remains = size; action->generic_action.max_duration = NO_MAX_DURATION; @@ -259,6 +259,11 @@ static double get_link_latency(const void *link) DIE_IMPOSSIBLE; } +static int link_shared(const void *link) +{ + DIE_IMPOSSIBLE; +} + static xbt_dict_t get_properties(void *link) { DIE_IMPOSSIBLE; @@ -369,6 +374,8 @@ static void surf_network_model_init_internal(void) get_link_bandwidth; surf_network_model->extension_public->get_link_latency = get_link_latency; + surf_network_model->extension_public->link_shared = + link_shared; surf_network_model->common_public->get_properties = get_properties;