Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[surf] Remove sg_cabinet_cb
authorGabriel Corona <gabriel.corona@loria.fr>
Wed, 2 Dec 2015 10:18:04 +0000 (11:18 +0100)
committerGabriel Corona <gabriel.corona@loria.fr>
Wed, 2 Dec 2015 10:18:04 +0000 (11:18 +0100)
src/include/simgrid/platf_interface.h
src/surf/sg_platf.cpp
src/surf/surf_routing.cpp

index eef7296..2e03113 100644 (file)
@@ -49,7 +49,6 @@ XBT_PUBLIC(void) sg_platf_gpu_add_cb(sg_platf_gpu_cb_t);
 
 XBT_PUBLIC(void) sg_platf_link_add_cb(sg_platf_link_cb_t);
 XBT_PUBLIC(void) sg_platf_cluster_add_cb(sg_platf_cluster_cb_t fct);
-XBT_PUBLIC(void) sg_platf_cabinet_add_cb(sg_platf_cabinet_cb_t fct);
 XBT_PUBLIC(void) sg_platf_postparse_add_cb(void_f_void_t fct);
 
 XBT_PUBLIC(void) sg_platf_ASroute_add_cb(sg_platf_route_cb_t);
index 2bdf9d6..c64ce9d 100644 (file)
@@ -21,7 +21,6 @@
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_parse);
 xbt_dynar_t sg_platf_link_cb_list = NULL;   // of sg_platf_link_cb_t
 xbt_dynar_t sg_platf_cluster_cb_list = NULL; // of sg_platf_cluster_cb_t
-xbt_dynar_t sg_platf_cabinet_cb_list = NULL; // of sg_platf_cluster_cb_t
 xbt_dynar_t sg_platf_postparse_cb_list = NULL; // of void_f_void_t
 
 xbt_dynar_t sg_platf_ASroute_cb_list = NULL; // of sg_platf_ASroute_cb_t
@@ -52,7 +51,6 @@ void sg_platf_init(void) {
 
   sg_platf_link_cb_list = xbt_dynar_new(sizeof(sg_platf_link_cb_t), NULL);
   sg_platf_cluster_cb_list = xbt_dynar_new(sizeof(sg_platf_cluster_cb_t), NULL);
-  sg_platf_cabinet_cb_list = xbt_dynar_new(sizeof(sg_platf_cabinet_cb_t), NULL);
   sg_platf_postparse_cb_list = xbt_dynar_new(sizeof(sg_platf_link_cb_t),NULL);
 
   sg_platf_ASroute_cb_list = xbt_dynar_new(sizeof(sg_platf_route_cb_t), NULL);
@@ -73,7 +71,6 @@ void sg_platf_exit(void) {
   xbt_dynar_free(&sg_platf_link_cb_list);
   xbt_dynar_free(&sg_platf_postparse_cb_list);
   xbt_dynar_free(&sg_platf_cluster_cb_list);
-  xbt_dynar_free(&sg_platf_cabinet_cb_list);
 
   xbt_dynar_free(&sg_platf_trace_cb_list);
   xbt_dynar_free(&sg_platf_trace_connect_cb_list);
@@ -179,13 +176,7 @@ void sg_platf_new_cluster(sg_platf_cluster_cbarg_t cluster){
     fun(cluster);
   }
 }
-void sg_platf_new_cabinet(sg_platf_cabinet_cbarg_t cabinet){
-  unsigned int iterator;
-  sg_platf_cabinet_cb_t fun;
-  xbt_dynar_foreach(sg_platf_cabinet_cb_list, iterator, fun) {
-    fun(cabinet);
-  }
-}
+
 void sg_platf_new_storage(sg_platf_storage_cbarg_t storage)
 {
   xbt_assert(!xbt_lib_get_or_null(storage_lib, storage->id,ROUTING_STORAGE_LEVEL),
@@ -518,9 +509,6 @@ void sg_platf_link_add_cb(sg_platf_link_cb_t fct) {
 void sg_platf_cluster_add_cb(sg_platf_cluster_cb_t fct) {
   xbt_dynar_push(sg_platf_cluster_cb_list, &fct);
 }
-void sg_platf_cabinet_add_cb(sg_platf_cabinet_cb_t fct) {
-  xbt_dynar_push(sg_platf_cabinet_cb_list, &fct);
-}
 void sg_platf_postparse_add_cb(void_f_void_t fct) {
   xbt_dynar_push(sg_platf_postparse_cb_list, &fct);
 }
index 90fb47c..9e7f208 100644 (file)
@@ -687,7 +687,7 @@ void routing_cluster_add_backbone(void* bb) {
   XBT_DEBUG("Add a backbone to AS '%s'", current_routing->p_name);
 }
 
-static void routing_parse_cabinet(sg_platf_cabinet_cbarg_t cabinet)
+void sg_platf_new_cabinet(sg_platf_cabinet_cbarg_t cabinet)
 {
   int start, end, i;
   char *groups , *host_id , *link_id = NULL;
@@ -1243,7 +1243,6 @@ void routing_register_callbacks()
   sg_platf_bypassASroute_add_cb(parse_E_bypassASroute);
 
   sg_platf_cluster_add_cb(routing_parse_cluster);
-  sg_platf_cabinet_add_cb(routing_parse_cabinet);
 
   sg_platf_postparse_add_cb(routing_parse_postparse);
   sg_platf_postparse_add_cb(check_disk_attachment);