X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/200fb4cf89cf885b36a52cfaeb21c2d763ab5cb9..32e043cb47a2c23cd2b419c037d56f8139d51765:/src/surf/cpu.c diff --git a/src/surf/cpu.c b/src/surf/cpu.c index f300667961..3814631308 100644 --- a/src/surf/cpu.c +++ b/src/surf/cpu.c @@ -146,8 +146,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); if (((surf_action_cpu_Cas01_t) action)->variable) lmm_variable_free(cpu_maxmin_system, @@ -160,7 +160,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) @@ -273,7 +273,7 @@ static surf_action_t execute(void *cpu, double size) XBT_IN2("(%s,%g)", CPU->name, size); action = xbt_new0(s_surf_action_cpu_Cas01_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.priority = 1.0;