Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill a deprecated function, deprecate another one, and inline a simcall
[simgrid.git] / src / simix / smx_host.cpp
index 111f9b3..a47fa09 100644 (file)
@@ -44,7 +44,7 @@ void SIMIX_host_on(sg_host_t h)
 
   xbt_assert((host != NULL), "Invalid parameters");
 
-  if (h->isOff()) {
+  if (h->is_off()) {
     simgrid::surf::Host* surf_host = h->extension<simgrid::surf::Host>();
     surf_host->turnOn();
 
@@ -83,11 +83,6 @@ void SIMIX_host_on(sg_host_t h)
   }
 }
 
-void simcall_HANDLER_host_off(smx_simcall_t simcall, sg_host_t h)
-{
- SIMIX_host_off(h, simcall->issuer);
-}
-
 /**
  * \brief Stop the host if it is on
  *
@@ -98,7 +93,7 @@ void SIMIX_host_off(sg_host_t h, smx_process_t issuer)
 
   xbt_assert((host != NULL), "Invalid parameters");
 
-  if (h->isOn()) {
+  if (h->is_on()) {
     simgrid::surf::Host* surf_host = h->extension<simgrid::surf::Host>();
     surf_host->turnOff();
 
@@ -163,7 +158,7 @@ const char* SIMIX_host_self_get_name(void)
   if (host == NULL || SIMIX_process_self() == simix_global->maestro_process)
     return "";
 
-  return SIMIX_host_get_name(host);
+  return sg_host_get_name(host);
 }
 
 void _SIMIX_host_free_process_arg(void *data)
@@ -480,7 +475,7 @@ void SIMIX_execution_finish(smx_synchro_t synchro)
             (int)synchro->state);
     }
     /* check if the host is down */
-    if (simcall->issuer->host->isOff()) {
+    if (simcall->issuer->host->is_off()) {
       simcall->issuer->context->iwannadie = 1;
     }
 
@@ -498,7 +493,7 @@ void SIMIX_post_host_execute(smx_synchro_t synchro)
 {
   if (synchro->type == SIMIX_SYNC_EXECUTE && /* FIMXE: handle resource failure
                                                * for parallel tasks too */
-      synchro->execution.host->isOff()) {
+      synchro->execution.host->is_off()) {
     /* If the host running the synchro failed, notice it so that the asking
      * process can be killed if it runs on that host itself */
     synchro->state = SIMIX_FAILED;