X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/483c86eaef3e3764d22fa2a4ed001a7b22fba395..dfc3b7c81f7e4fec5c8da96745042766dc0da27f:/doc/doxygen/inside_extending.doc diff --git a/doc/doxygen/inside_extending.doc b/doc/doxygen/inside_extending.doc index 9593489d61..a1f1286e1f 100644 --- a/doc/doxygen/inside_extending.doc +++ b/doc/doxygen/inside_extending.doc @@ -108,7 +108,7 @@ initialization function. 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}, @@ -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. -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` reprensenting the operation in the kernal. When the operations completes, the user process is waken up @@ -209,25 +209,25 @@ with the result: ~~~ try { - std::vector result = simgrid::simix::kernelSync([&] { + std::vector result = simgrid::simix::kernel_sync([&] { // Fictional example, simgrid::kernel::readFile does not exist. simgrid::kernel::Future> 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); } ~~~ -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> result = simgrid::simix::kernelSync([&] { +simgrid::simix::Future> result = simgrid::simix::kernel_sync([&] { // Fictional example, simgrid::kernel::readFile does not exist. simgrid::kernek::Future> result = simgrid::kernel::readFile(file); return result; @@ -249,7 +249,7 @@ catch (std::runtime_error& e) { } ~~~ -Note: `kernelSync(f)` could be implemented as `kernelAsync(f).get()`. +Note: `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?