Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[simix] Rename s_smx_process_arg to simgrid::simix::ProcessArg
authorGabriel Corona <gabriel.corona@loria.fr>
Fri, 20 May 2016 08:16:49 +0000 (10:16 +0200)
committerGabriel Corona <gabriel.corona@loria.fr>
Mon, 23 May 2016 07:05:21 +0000 (09:05 +0200)
src/simix/smx_host.cpp
src/simix/smx_process.cpp
src/simix/smx_process_private.h
src/surf/sg_platf.cpp

index ce5d2a6..24adbc5 100644 (file)
@@ -187,7 +187,7 @@ void SIMIX_host_add_auto_restart_process(sg_host_t host,
   if (!sg_host_simix(host)->auto_restart_processes) {
     sg_host_simix(host)->auto_restart_processes = xbt_dynar_new(sizeof(smx_process_arg_t),_SIMIX_host_free_process_arg);
   }
-  smx_process_arg_t arg = new s_smx_process_arg_t();
+  smx_process_arg_t arg = new simgrid::simix::ProcessArg();
   arg->name = name;
   arg->code = code;
   arg->data = data;
index 54d6932..0effb83 100644 (file)
@@ -991,7 +991,7 @@ smx_process_t SIMIX_process_restart(smx_process_t process, smx_process_t issuer)
   XBT_DEBUG("Restarting process %s on %s", process->name, sg_host_get_name(process->host));
   //retrieve the arguments of the old process
   //FIXME: Factorize this with SIMIX_host_add_auto_restart_process ?
-  s_smx_process_arg_t arg;
+  simgrid::simix::ProcessArg arg;
   arg.code = process->code;
   arg.hostname = sg_host_get_name(process->host);
   arg.kill_time = SIMIX_timer_get_date(process->kill_timer);
index c0fe279..8803cd7 100644 (file)
@@ -19,7 +19,10 @@ typedef struct s_smx_process_exit_fun {
   void *arg;
 } s_smx_process_exit_fun_t, *smx_process_exit_fun_t;
 
-typedef class s_smx_process_arg {
+namespace simgrid {
+namespace simix {
+
+class ProcessArg {
 public:
   std::string name;
   xbt_main_func_t code;
@@ -30,10 +33,7 @@ public:
   double kill_time;
   xbt_dict_t properties;
   unsigned auto_restart:1;
-} s_smx_process_arg_t, *smx_process_arg_t;
-
-namespace simgrid {
-namespace simix {
+};
 
 class Process {
 public:
@@ -75,6 +75,8 @@ public:
 }
 }
 
+typedef simgrid::simix::ProcessArg *smx_process_arg_t;
+
 typedef simgrid::simix::Process* smx_process_t;
 
 SG_BEGIN_DECL()
index 27763ef..3ac46e5 100644 (file)
@@ -575,7 +575,7 @@ void sg_platf_new_process(sg_platf_process_cbarg_t process)
   smx_process_arg_t arg = NULL;
   smx_process_t process_created = NULL;
 
-  arg = new s_smx_process_arg_t();
+  arg = new simgrid::simix::ProcessArg();
   arg->code = parse_code;
   arg->data = NULL;
   arg->hostname = sg_host_get_name(host);
@@ -593,7 +593,7 @@ void sg_platf_new_process(sg_platf_process_cbarg_t process)
   xbt_dynar_push_as(sg_host_simix(host)->boot_processes,smx_process_arg_t,arg);
 
   if (start_time > SIMIX_get_clock()) {
-    arg = new s_smx_process_arg_t();
+    arg = new simgrid::simix::ProcessArg();
     arg->name = process->argv[0];
     arg->code = parse_code;
     arg->data = NULL;