Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Move the host-on-off fix above
[simgrid.git] / src / surf / workstation_interface.cpp
index a1d9d3a..fc2bcde 100644 (file)
@@ -155,9 +155,13 @@ int Workstation::getNbPstates()
   return p_cpu->getNbPstates();
 }
 
-void Workstation::setPowerPeakAt(int pstate_index)
+void Workstation::setPstate(int pstate_index)
 {
-       p_cpu->setPowerPeakAt(pstate_index);
+       p_cpu->setPstate(pstate_index);
+}
+int Workstation::getPstate()
+{
+       return p_cpu->getPstate();
 }
 
 xbt_dict_t Workstation::getProperties()
@@ -376,7 +380,7 @@ int Workstation::fileMove(surf_file_t fd, const char* fullpath){
 
 xbt_dynar_t Workstation::getVms()
 {
-  xbt_dynar_t dyn = xbt_dynar_new(sizeof(smx_host_t), NULL);
+  xbt_dynar_t dyn = xbt_dynar_new(sizeof(WorkstationVMPtr), NULL);
 
   /* iterate for all virtual machines */
   for (WorkstationVMModel::vm_list_t::iterator iter =
@@ -384,8 +388,8 @@ xbt_dynar_t Workstation::getVms()
        iter !=  WorkstationVMModel::ws_vms.end(); ++iter) {
 
     WorkstationVMPtr ws_vm = &*iter;
-    if (this == ws_vm-> p_subWs)
-      xbt_dynar_push(dyn, &ws_vm->p_subWs);
+    if (this == ws_vm->p_subWs)
+      xbt_dynar_push(dyn, &ws_vm);
   }
 
   return dyn;