Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Give simgrid's host its own header file and datatype
[simgrid.git] / src / simix / smx_deployment.c
index 50b4588..f4d472f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, 2009-2013. The SimGrid Team.
+/* Copyright (c) 2007, 2009-2014. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@ extern int surf_parse_lineno;
 
 static void parse_process(sg_platf_process_cbarg_t process)
 {
-  smx_host_t host = SIMIX_host_get_by_name(process->host);
+  sg_host_t host = SIMIX_host_get_by_name(process->host);
   if (!host)
     THROWF(arg_error, 0, "Host '%s' unknown", process->host);
   parse_code = SIMIX_get_registered_function(process->function);
@@ -80,7 +80,7 @@ static void parse_process(sg_platf_process_cbarg_t process)
                                             process->argc,
                                             (char**)(process->argv),
                                             current_property_set,
-                                            auto_restart);
+                                            auto_restart, NULL);
     else
       simcall_process_create(&process_created, (char*)(process->argv)[0], parse_code, NULL, sg_host_name(host), kill_time, process->argc,
           (char**)process->argv, current_property_set,auto_restart);
@@ -194,10 +194,9 @@ void SIMIX_process_set_function(const char *process_host,
                                 double process_start_time,
                                 double process_kill_time)
 {
-  s_sg_platf_process_cbarg_t process;
-  memset(&process,0,sizeof(process));
+  s_sg_platf_process_cbarg_t process = SG_PLATF_PROCESS_INITIALIZER;
 
-  smx_host_t host = SIMIX_host_get_by_name(process_host);
+  sg_host_t host = SIMIX_host_get_by_name(process_host);
   if (!host)
     THROWF(arg_error, 0, "Host '%s' unknown", process_host);
   process.host = sg_host_name(host);
@@ -220,8 +219,6 @@ void SIMIX_process_set_function(const char *process_host,
   process.host = process_host;
   process.kill_time = process_kill_time;
   process.start_time = process_start_time;
-  process.on_failure = SURF_PROCESS_ON_FAILURE_DIE;
-  process.properties = NULL;
 
   sg_platf_new_process(&process);
 }