Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill two useless functions at once
authorMartin Quinson <martin.quinson@loria.fr>
Sun, 28 Aug 2016 20:08:05 +0000 (22:08 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sun, 28 Aug 2016 20:08:05 +0000 (22:08 +0200)
include/simgrid/host.h
src/simgrid/host.cpp
src/simix/libsmx.cpp
src/simix/smx_global.cpp
src/simix/smx_host.cpp
src/simix/smx_host_private.h

index 4321c24..6713ccf 100644 (file)
@@ -37,7 +37,6 @@ XBT_PUBLIC(void) sg_host_msg_set(sg_host_t host, msg_host_priv_t priv);
 
 // ========== Simix layer =============
 XBT_PUBLIC(smx_host_priv_t) sg_host_simix(sg_host_t host);
-XBT_PUBLIC(void) sg_host_simix_set(sg_host_t host, smx_host_priv_t priv);
 
 // ========= storage related functions ============
 XBT_PUBLIC(xbt_dict_t) sg_host_get_mounted_storage_list(sg_host_t host);
index 8c12c9c..77aa8ef 100644 (file)
@@ -95,9 +95,6 @@ void sg_host_msg_set(sg_host_t host, msg_host_priv_t smx_host) {
 smx_host_priv_t sg_host_simix(sg_host_t host){
   return host->extension<simgrid::simix::Host>();
 }
-void sg_host_simix_set(sg_host_t host, smx_host_priv_t smx_host) {
-  host->extension_set<simgrid::simix::Host>(smx_host);
-}
 
 // ========= storage related functions ============
 xbt_dict_t sg_host_get_mounted_storage_list(sg_host_t host){
index 4fd6d54..2fa37b7 100644 (file)
@@ -195,7 +195,7 @@ sg_host_t simcall_vm_create(const char *name, sg_host_t phys_host)
 {
   return simgrid::simix::kernelImmediate([&name, &phys_host] {
     sg_host_t host = surf_vm_model->createVM(name, phys_host);
-    SIMIX_host_create(host);
+    host->extension_set<simgrid::simix::Host>(new simgrid::simix::Host());
 
     return host;
   });
index a47eaec..6598f07 100644 (file)
@@ -226,7 +226,7 @@ void SIMIX_global_init(int *argc, char **argv)
     sg_platf_init();
     simgrid::surf::on_postparse.connect(SIMIX_post_create_environment);
     simgrid::s4u::Host::onCreation.connect([](simgrid::s4u::Host& host) {
-      SIMIX_host_create(&host);
+      host.extension_set<simgrid::simix::Host>(new simgrid::simix::Host());
     });
 
     simgrid::surf::storageCreatedCallbacks.connect([](simgrid::surf::Storage* storage) {
index d2d8550..f27e7ac 100644 (file)
@@ -53,12 +53,6 @@ namespace simgrid {
   }
 }
 
-/** @brief Internal function to create a SIMIX host. */
-void SIMIX_host_create(sg_host_t host)
-{
-  sg_host_simix_set(host, new simgrid::simix::Host());
-}
-
 /** @brief Start the host if it is off */
 void SIMIX_host_on(sg_host_t h)
 {
index 261fe15..5cfdd36 100644 (file)
@@ -38,7 +38,6 @@ namespace simgrid {
 typedef simgrid::simix::Host s_smx_host_priv_t;
 
 XBT_PRIVATE void _SIMIX_host_free_process_arg(void *);
-XBT_PRIVATE void SIMIX_host_create(sg_host_t host);
 
 XBT_PRIVATE void SIMIX_host_add_auto_restart_process(sg_host_t host,
                                          const char *name,