Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge pull request #272 from mpoquet/SMPI_convert
[simgrid.git] / doc / doxygen / inside_extending.doc
index 9593489..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},
@@ -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?