X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/3bd0ffd5e6dd32ddf61c69456b490f2aa9f2517b..dfc3b7c81f7e4fec5c8da96745042766dc0da27f:/include/simgrid/simix/blocking_simcall.hpp?ds=sidebyside diff --git a/include/simgrid/simix/blocking_simcall.hpp b/include/simgrid/simix/blocking_simcall.hpp index 2a93bf2364..d2c87daeec 100644 --- a/include/simgrid/simix/blocking_simcall.hpp +++ b/include/simgrid/simix/blocking_simcall.hpp @@ -46,8 +46,7 @@ XBT_PUBLIC void unblock(smx_actor_t process); * @return Value of the kernel future * @exception Exception from the kernel future */ -template -auto kernelSync(F code) -> decltype(code().get()) +template auto kernel_sync(F code) -> decltype(code().get()) { typedef decltype(code().get()) T; if (SIMIX_is_maestro()) @@ -71,6 +70,11 @@ auto kernelSync(F code) -> decltype(code().get()) }); return result.get(); } +template +XBT_ATTRIB_DEPRECATED_v323("Please use simix::kernel_sync()") auto kernelSync(F code) -> decltype(code().get()) +{ + return kernel_sync(code); +} /** A blocking (`wait()`-based) future for SIMIX processes */ // TODO, .wait_for() @@ -146,9 +150,7 @@ private: * @param code SimGrid kernel code which returns a simgrid::kernel::Future * @return Actor future */ -template -auto kernelAsync(F code) - -> Future +template auto kernel_async(F code) -> Future { typedef decltype(code().get()) T; @@ -158,7 +160,11 @@ auto kernelAsync(F code) // Wrap the kernel future in a actor future: return simgrid::simix::Future(std::move(future)); } - +template +XBT_ATTRIB_DEPRECATED_v323("Please use simix::kernel_sync()") auto kernelAsync(F code) -> Future +{ + return kernel_async(code); +} } }