Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
[simgrid.git] / doc / doxygen / inside_extending.doc
index a0a8a97..a1f1286 100644 (file)
@@ -108,7 +108,7 @@ initialization function.
 s_surf_model_description_t surf_plugin_description[] = {
                   {"Energy",
                    "Cpu energy consumption.",
 s_surf_model_description_t surf_plugin_description[] = {
                   {"Energy",
                    "Cpu energy consumption.",
-                   sg_energy_plugin_init},
+                   sg_host_energy_plugin_init},
                   {"MyNetworkPlugin",
                    "My network plugin.",
                    sg_my_network_plugin_init},
                   {"MyNetworkPlugin",
                    "My network plugin.",
                    sg_my_network_plugin_init},
@@ -160,13 +160,13 @@ the simcall definitions from src/simix/simcalls.in, checks that both
 `simcall_<name>()` and `simcall_HANDLER()` are defined somewhere, and
 generates the following files:
 
 `simcall_<name>()` and `simcall_HANDLER()` are defined somewhere, and
 generates the following files:
 
-- smx_popping_accessors.h:
+- popping_accessors.hpp:
   Helper functions to get and set simcall arguments and results
   Helper functions to get and set simcall arguments and results
-- smx_popping_bodies.cpp:
+- popping_bodies.cpp:
   The BODY function of each simcall
   The BODY function of each simcall
-- smx_popping_enum.c:
+- popping_enum.h:
   Definition of type `enum e_smx_simcall_t` (one value per existing simcall)
   Definition of type `enum e_smx_simcall_t` (one value per existing simcall)
-- smx_popping_generated.cpp:
+- popping_generated.cpp:
   Definitions of `simcall_names[]` (debug name of each simcall), and
   SIMIX_simcall_enter() that deals with the simcall from within the kernel
 
   Definitions of `simcall_names[]` (debug name of each simcall), and
   SIMIX_simcall_enter() that deals with the simcall from within the kernel
 
@@ -201,7 +201,7 @@ If there is no blocking and no mutation involved (getters), you might consider
 avoiding switching to Maestro and reading directly the data you're interested
 in.
 
 avoiding switching to Maestro and reading directly the data you're interested
 in.
 
-For simcalls which might block, `kernelSync()` can be used. It takes a
+For simcalls which might block, `kernel_sync()` can be used. It takes a
 C++ callback and executes it immediately in maestro. This C++ callback is
 expected to return a `simgrid::kernel::Future<T>` reprensenting the operation
 in the kernal. When the operations completes, the user process is waken up
 C++ callback and executes it immediately in maestro. This C++ callback is
 expected to return a `simgrid::kernel::Future<T>` reprensenting the operation
 in the kernal. When the operations completes, the user process is waken up
@@ -209,25 +209,25 @@ with the result:
 
 ~~~
 try {
 
 ~~~
 try {
-  std::vector<char> result = simgrid::simix::kernelSync([&] {
+  std::vector<char> result = simgrid::simix::kernel_sync([&] {
     // Fictional example, simgrid::kernel::readFile does not exist.
     simgrid::kernel::Future<std::vector<char>> result = simgrid::kernel::readFile(file);
     return result;
   });
   XBT_DEBUG("Finished reading file %s: length %zu", file, result.size());
 }
     // Fictional example, simgrid::kernel::readFile does not exist.
     simgrid::kernel::Future<std::vector<char>> result = simgrid::kernel::readFile(file);
     return result;
   });
   XBT_DEBUG("Finished reading file %s: length %zu", file, result.size());
 }
-// If the operation failed, kernelSync() throws an exception:
+// If the operation failed, kernel_sync() throws an exception:
 catch (std::runtime_error& e) {
   XBT_ERROR("Could not read file %s", file);
 }
 ~~~
 
 catch (std::runtime_error& e) {
   XBT_ERROR("Could not read file %s", file);
 }
 ~~~
 
-Asynchronous blocks can be implemented with `kernelAsync()`. It works
-like `kernelSync()` but does not block. Instead, it returns a
+Asynchronous blocks can be implemented with `kernel_async()`. It works
+like `kernel_sync()` but does not block. Instead, it returns a
 `simgrid::simix::Future` representing the operation in the process:
 
 ~~~
 `simgrid::simix::Future` representing the operation in the process:
 
 ~~~
-simgrid::simix::Future<std:vector<char>> result = simgrid::simix::kernelSync([&] {
+simgrid::simix::Future<std:vector<char>> result = simgrid::simix::kernel_sync([&] {
   // Fictional example, simgrid::kernel::readFile does not exist.
   simgrid::kernek::Future<std::vector<char>> result = simgrid::kernel::readFile(file);
   return result;
   // Fictional example, simgrid::kernel::readFile does not exist.
   simgrid::kernek::Future<std::vector<char>> result = simgrid::kernel::readFile(file);
   return result;
@@ -249,7 +249,7 @@ catch (std::runtime_error& e) {
 }
 ~~~
 
 }
 ~~~
 
-<b>Note:</b> `kernelSync(f)` could be implemented as `kernelAsync(f).get()`.
+<b>Note:</b> `kernel_sync(f)` could be implemented as `kernel_async(f).get()`.
 
 \section simgrid_dev_guide_tag What is How to add a new tag for xml files?
 
 
 \section simgrid_dev_guide_tag What is How to add a new tag for xml files?