static void action_use(surf_action_t action)
{
- action->using++;
+ action->refcount ++;
return;
}
static int action_free(surf_action_t action)
{
- action->using--;
+ action->refcount --;
- if (!action->using) {
+ if (!action->refcount ) {
xbt_swag_remove(action, action->state_set);
if (((surf_action_workstation_L07_t) action)->variable)
lmm_variable_free(ptask_maxmin_system,
action = xbt_new0(s_surf_action_workstation_L07_t, 1);
DEBUG3("Creating a parallel task (%p) with %d cpus and %d links.",
action, workstation_nb, nb_link);
- action->generic_action.using = 1;
+ action->generic_action.refcount = 1;
action->generic_action.cost = amount;
action->generic_action.remains = amount;
action->generic_action.max_duration = NO_MAX_DURATION;
return ((link_L07_t) link)->lat_current;
}
+static int link_shared(const void *link)
+{
+ return lmm_constraint_is_shared(((link_L07_t) link)->constraint);
+}
/**************************************/
/*** Resource Creation & Destruction **/
get_link_bandwidth;
surf_workstation_model->extension_public->get_link_latency =
get_link_latency;
+ surf_workstation_model->extension_public->link_shared =
+ link_shared;
surf_workstation_model->common_public->get_properties = get_properties;