Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
bypass simix in simcall to surf::Cpu::setPState
[simgrid.git] / src / surf / surf_c_bindings.cpp
index 866faf2..d1907c6 100644 (file)
@@ -243,19 +243,6 @@ const char *surf_resource_name(surf_cpp_resource_t resource){
   return resource->getName();
 }
 
-int surf_resource_is_on(surf_cpp_resource_t resource){
-  return resource->isOn();
-}
-int surf_resource_is_off(surf_cpp_resource_t resource){
-  return resource->isOff();
-}
-void surf_resource_turn_on(surf_cpp_resource_t resource){
-  resource->turnOn();
-}
-void surf_resource_turn_off(surf_cpp_resource_t resource){
-  resource->turnOff();
-}
-
 surf_action_t surf_host_sleep(sg_host_t host, double duration){
        return host->p_cpu->sleep(duration);
 }
@@ -280,17 +267,6 @@ double surf_host_get_power_peak_at(sg_host_t host, int pstate_index){
   return host->p_cpu->getPowerPeakAt(pstate_index);
 }
 
-int surf_host_get_nb_pstates(sg_host_t host){
-  return host->p_cpu->getNbPStates();
-}
-
-void surf_host_set_pstate(sg_host_t host, int pstate_index){
-  host->p_cpu->setPState(pstate_index);
-}
-int surf_host_get_pstate(sg_host_t host){
-  return host->p_cpu->getPState();
-}
-
 using simgrid::energy::HostEnergy;
 using simgrid::energy::surf_energy;
 
@@ -382,9 +358,9 @@ void surf_host_set_params(sg_host_t host, vm_params_t params){
   get_casted_host(host)->setParams(params);
 }
 
-void surf_vm_destroy(sg_host_t vm){
+void surf_vm_destroy(sg_host_t vm){ // FIXME:DEADCODE
   vm->p_cpu = nullptr;
-  delete vm->p_netcard;
+  vm->p_netcard = nullptr;
 }
 
 void surf_vm_suspend(sg_host_t vm){
@@ -455,10 +431,6 @@ double surf_action_get_remains(surf_action_t action){
   return action->getRemains();
 }
 
-void surf_action_unref(surf_action_t action){
-  action->unref();
-}
-
 void surf_action_suspend(surf_action_t action){
   action->suspend();
 }