surf_resource_free);
cpu->action_set = xbt_swag_new(xbt_swag_offset(action, cpu_list_hookup));
-#ifdef HAVE_TRACING
- TRACE_surf_host_declaration(name, core * power_scale * power_peak);
-#endif
-
return cpu;
}
XBT_OUT;
}
+#ifdef HAVE_TRACING
+static void cpu_im_action_set_category(surf_action_t action,
+ const char *category)
+{
+ XBT_IN2("(%p,%s)", action, category);
+ action->category = xbt_strdup (category);
+ XBT_OUT;
+}
+#endif
+
static double cpu_im_action_get_remains(surf_action_t action)
{
XBT_IN1("(%p)", action);
tmgr_trace_t state_trace,
xbt_dict_t cpu_properties)
{
- xbt_assert0(core==1,"Multi-core not handled with this model yet");
cpu_im_new(name, power_peak, power_scale, power_trace, core,
state_initial, state_trace, cpu_properties);
}
surf_cpu_model->is_suspended = cpu_im_action_is_suspended;
surf_cpu_model->set_max_duration = cpu_im_action_set_max_duration;
surf_cpu_model->set_priority = cpu_im_action_set_priority;
+#ifdef HAVE_TRACING
+ surf_cpu_model->set_category = cpu_im_action_set_category;
+#endif
surf_cpu_model->get_remains = cpu_im_action_get_remains;
surf_cpu_model->extension.cpu.execute = cpu_im_execute;