#include "cpu_private.h"
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(cpu, surf,
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_cpu, surf,
"Logging specific to the SURF CPU module");
surf_cpu_resource_t surf_cpu_resource = NULL;
static void action_recycle(surf_action_t action)
{
DIE_IMPOSSIBLE;
- return;
}
static void action_change_state(surf_action_t action,
return load*(((cpu_Cas01_t) cpu)->power_scale);
}
+static double get_available_speed(void *cpu)
+{
+ /* number between 0 and 1 */
+ return ((cpu_Cas01_t) cpu)->power_current;
+}
+
static void finalize(void)
{
xbt_dict_free(&cpu_set);
surf_cpu_resource->extension_public->get_state = get_state;
surf_cpu_resource->extension_public->get_speed = get_speed;
+ surf_cpu_resource->extension_public->get_available_speed = get_available_speed;
cpu_set = xbt_dict_new();