Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
snake_case simix/blocking_simcall.hpp
[simgrid.git] / include / simgrid / simix / blocking_simcall.hpp
index 2a93bf2..d2c87da 100644 (file)
@@ -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<class F>
-auto kernelSync(F code) -> decltype(code().get())
+template <class F> 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 <class F>
+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<class F>
-auto kernelAsync(F code)
-  -> Future<decltype(code().get())>
+template <class F> auto kernel_async(F code) -> Future<decltype(code().get())>
 {
   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<T>(std::move(future));
 }
-
+template <class F>
+XBT_ATTRIB_DEPRECATED_v323("Please use simix::kernel_sync()") auto kernelAsync(F code) -> Future<decltype(code().get())>
+{
+  return kernel_async(code);
+}
 }
 }