Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
inline two more simcalls: host_get_pstate and host_get_consumed_energy
[simgrid.git] / src / simix / smx_process.c
index 51c2859..57d32af 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2014. The SimGrid Team.
+/* Copyright (c) 2007-2015. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -9,8 +9,8 @@
 #include "xbt/log.h"
 #include "xbt/dict.h"
 #include "mc/mc.h"
-#include "mc/mc_replay.h"
-#include "mc/mc_client.h"
+#include "src/mc/mc_replay.h"
+#include "src/mc/mc_client.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_process, simix,
                                 "Logging specific to SIMIX (process)");
@@ -163,7 +163,7 @@ void SIMIX_process_stop(smx_process_t arg) {
   /* Add the process to the list of process to restart, only if
    * the host is down
    */
-  if (arg->auto_restart && !SIMIX_host_get_state(arg->host)) {
+  if (arg->auto_restart && !sg_host_get_state(arg->host)) {
     SIMIX_host_add_auto_restart_process(arg->host,arg->name,arg->code, arg->data,
                                         sg_host_name(arg->host),
                                         SIMIX_timer_get_date(arg->kill_timer),
@@ -236,7 +236,7 @@ smx_process_t SIMIX_process_create(
 
   XBT_DEBUG("Start process %s on host '%s'", name, hostname);
 
-  if (!SIMIX_host_get_state(host)) {
+  if (!sg_host_get_state(host)) {
     int i;
     XBT_WARN("Cannot launch process '%s' on failed host '%s'", name,
           hostname);
@@ -348,7 +348,7 @@ void SIMIX_process_kill(smx_process_t process, smx_process_t issuer) {
 
     case SIMIX_SYNC_EXECUTE:
     case SIMIX_SYNC_PARALLEL_EXECUTE:
-      SIMIX_host_execution_destroy(process->waiting_synchro);
+      SIMIX_process_execution_destroy(process->waiting_synchro);
       break;
 
     case SIMIX_SYNC_COMMUNICATE:
@@ -405,7 +405,7 @@ void SIMIX_process_throw(smx_process_t process, xbt_errcat_t cat, int value, con
 
     case SIMIX_SYNC_EXECUTE:
     case SIMIX_SYNC_PARALLEL_EXECUTE:
-      SIMIX_host_execution_cancel(process->waiting_synchro);
+      SIMIX_process_execution_cancel(process->waiting_synchro);
       break;
 
     case SIMIX_SYNC_COMMUNICATE:
@@ -461,8 +461,7 @@ void SIMIX_process_killall(smx_process_t issuer, int reset_pid)
   SIMIX_process_empty_trash();
 }
 
-void simcall_HANDLER_process_change_host(smx_simcall_t simcall, smx_process_t process,
-                                  sg_host_t dest)
+void simcall_HANDLER_process_set_host(smx_simcall_t simcall, smx_process_t process, sg_host_t dest)
 {
   process->new_host = dest;
 }
@@ -538,7 +537,7 @@ smx_synchro_t SIMIX_process_suspend(smx_process_t process, smx_process_t issuer)
     }
   } else {
     /* FIXME: computation size is zero. Is it okay that bound is zero ? */
-    return SIMIX_host_execute("suspend", process->host, 0.0, 1.0, 0.0, 0);
+    return SIMIX_process_execute(process, "suspend", 0.0, 1.0, 0.0, 0);
   }
 }