Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[surf] Rename callback registration functions
authorGabriel Corona <gabriel.corona@loria.fr>
Mon, 30 Nov 2015 15:00:49 +0000 (16:00 +0100)
committerGabriel Corona <gabriel.corona@loria.fr>
Mon, 30 Nov 2015 15:00:49 +0000 (16:00 +0100)
src/msg/msg_global.c
src/simix/smx_global.c
src/surf/callbacks.cpp
src/surf/callbacks.h

index 99e62cb..818d331 100644 (file)
@@ -67,7 +67,7 @@ void MSG_init_nocheck(int *argc, char **argv) {
     SIMIX_function_register_process_cleanup(MSG_process_cleanup_from_SIMIX);
 
     sg_platf_postparse_add_cb(MSG_post_create_environment);
-    surf_host_created_callback(MSG_host_create_);
+    surf_on_host_created(MSG_host_create_);
   }
 
   if(MC_is_active()){
index c501208..b37a920 100644 (file)
@@ -227,8 +227,8 @@ void SIMIX_global_init(int *argc, char **argv)
     /* register a function to be called by SURF after the environment creation */
     sg_platf_init();
     sg_platf_postparse_add_cb(SIMIX_post_create_environment);
-    surf_host_created_callback(SIMIX_host_create);
-    surf_storage_created_callback(SIMIX_storage_create_);
+    surf_on_host_created(SIMIX_host_create);
+    surf_on_storage_created(SIMIX_storage_create_);
 
   }
   if (!simix_timers) {
index 4d1d041..86dedde 100644 (file)
@@ -10,7 +10,7 @@
 #include "src/surf/surf_interface.hpp"
 #include "src/surf/host_interface.hpp"
 
-void surf_host_created_callback(void (*callback)(sg_host_t))
+void surf_on_host_created(void (*callback)(sg_host_t))
 {
   hostCreatedCallbacks.connect([callback](Host* host) {
     const char* id = host->getName();
@@ -20,7 +20,7 @@ void surf_host_created_callback(void (*callback)(sg_host_t))
   });
 }
 
-void surf_storage_created_callback(void (*callback)(sg_storage_t))
+void surf_on_storage_created(void (*callback)(sg_storage_t))
 {
   storageCreatedCallbacks.connect([callback](Storage* storage) {
     const char* id = storage->getName();
index 4d8d66c..3f2b1b6 100644 (file)
@@ -18,8 +18,8 @@
 
 SG_BEGIN_DECL();
 
-XBT_PRIVATE void surf_host_created_callback(void (*callback)(sg_host_t));
-XBT_PRIVATE void surf_storage_created_callback(void (*callback)(sg_storage_t));
+XBT_PRIVATE void surf_on_host_created(void (*callback)(sg_host_t));
+XBT_PRIVATE void surf_on_storage_created(void (*callback)(sg_storage_t));
 
 SG_END_DECL();