Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Adding workstation : a single CPU and a network card...
[simgrid.git] / src / surf / cpu.c
index 9f1265b..64649ef 100644 (file)
@@ -1,7 +1,9 @@
-/* Authors: Arnaud Legrand                                                  */
+/*     $Id$     */
+
+/* Copyright (c) 2004 Arnaud Legrand. All rights reserved.                  */
 
 /* This program is free software; you can redistribute it and/or modify it
  under the terms of the license (GNU LGPL) which comes with this package. */
* under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "cpu_private.h"
 #include "xbt/dict.h"
@@ -300,7 +302,7 @@ static surf_action_t execute(void *cpu, xbt_maxmin_float_t size)
 
 static e_surf_cpu_state_t get_state(void *cpu)
 {
-  return SURF_CPU_OFF;
+  return ((cpu_t) cpu)->state_current;
 }
 
 static void finalize(void)