X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c5d588d76539d285fb67bef1ab477191622b94a9..HEAD:/doc/doxygen/uhood_switch.doc diff --git a/doc/doxygen/uhood_switch.doc b/doc/doxygen/uhood_switch.doc index 7b579d4cbd..98d55a9c47 100644 --- a/doc/doxygen/uhood_switch.doc +++ b/doc/doxygen/uhood_switch.doc @@ -109,7 +109,7 @@ simulation kernel. Our futures are based on the C++ Concurrency Technical Specification API, with a few differences: - - The simulation kernel is single-threaded so we do not need + - The simulation kernel is single-threaded so we do not need inter-thread synchronization for our futures. - As the simulation kernel cannot block, `f.wait()` is not meaningful @@ -279,7 +279,7 @@ So a simcall is a way for the actor to push a request to the simulation kernel and yield the control until the request is fulfilled. The performance requirements are very high because the actors usually do an inordinate amount of simcalls during the -simulation. +simulation. As for real syscalls, the basic idea is to write the wanted call and its arguments in a memory area that is specific to the actor, and @@ -336,7 +336,6 @@ struct s_smx_simcall { union u_smx_scalar result; // Some additional stuff: smx_timer_t timer; - int mc_value; }; @endcode @@ -412,7 +411,7 @@ type and properly handles exceptions: @code{cpp} template -typename std::result_of::type kernelImmediate(F&& code) +typename std::result_of_t kernelImmediate(F&& code) { // If we are in the simulation kernel, we take the fast path and // execute the code directly without simcall @@ -422,7 +421,7 @@ typename std::result_of::type kernelImmediate(F&& code) // If we are in the application, pass the code to the simulation // kernel which executes it for us and reports the result: - typedef typename std::result_of::type R; + typedef typename std::result_of_t R; simgrid::xbt::Result result; simcall_run_kernel([&]{ xbt_assert(SIMIX_is_maestro(), "Not in maestro"); @@ -439,9 +438,9 @@ Example of usage: @code{cpp} xbt_dict_t Host::properties() { return simgrid::simix::kernelImmediate([&] { - simgrid::surf::HostImpl* surf_host = - this->extension(); - return surf_host->getProperties(); + simgrid::kernel::resource::HostImpl* host = + this->extension(); + return host->getProperties(); }); } @endcode @@ -676,7 +675,7 @@ public: void notify_one(); void notify_all(); - + }; @endcode @@ -768,7 +767,7 @@ expose asynchronous operations in the simulation kernel to the actors. In addition, we wrote variations of some other C++ standard library classes (`SimulationClock`, `Mutex`, `ConditionVariable`) which work in the simulation: - + * using simulated time; * using simcalls for synchronisation. @@ -931,7 +930,7 @@ auto makeTask(F code, Args... args) @endcode -## Notes +## Notes [^getcompared]: