return ((cpu_L07_t) r)->properties;
}
-/* action_get_state is inherited from the surf module */
-
-static void action_use(surf_action_t action)
-{
- action->refcount++;
- return;
-}
-
-static int action_free(surf_action_t action)
+static int action_unref(surf_action_t action)
{
action->refcount--;
static void action_cancel(surf_action_t action)
{
- surf_action_change_state(action, SURF_ACTION_FAILED);
+ surf_action_state_set(action, SURF_ACTION_FAILED);
return;
}
if ((action->generic_action.remains <= 0) &&
(lmm_get_variable_weight(action->variable) > 0)) {
action->generic_action.finish = surf_get_clock();
- surf_action_change_state((surf_action_t) action, SURF_ACTION_DONE);
+ surf_action_state_set((surf_action_t) action, SURF_ACTION_DONE);
} else if ((action->generic_action.max_duration != NO_MAX_DURATION) &&
(action->generic_action.max_duration <= 0)) {
action->generic_action.finish = surf_get_clock();
- surf_action_change_state((surf_action_t) action, SURF_ACTION_DONE);
+ surf_action_state_set((surf_action_t) action, SURF_ACTION_DONE);
} else {
/* Need to check that none of the model has failed */
lmm_constraint_t cnst = NULL;
(((cpu_L07_t) constraint_id)->state_current == SURF_CPU_OFF))) {
DEBUG1("Action (%p) Failed!!", action);
action->generic_action.finish = surf_get_clock();
- surf_action_change_state((surf_action_t) action,
+ surf_action_state_set((surf_action_t) action,
SURF_ACTION_FAILED);
break;
}
{
surf_workstation_model = surf_model_init();
- surf_workstation_model->action_use = action_use;
- surf_workstation_model->action_free = action_free;
+ surf_workstation_model->action_unref = action_unref;
surf_workstation_model->action_cancel = action_cancel;
- surf_workstation_model->action_change_state = surf_action_change_state;
- surf_workstation_model->action_set_data = surf_action_set_data;
+ surf_workstation_model->action_state_set = surf_action_state_set;
surf_workstation_model->suspend = action_suspend;
surf_workstation_model->resume = action_resume;
surf_workstation_model->is_suspended = action_is_suspended;