Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
transparent cleanups around simcalls mechanism
[simgrid.git] / src / simix / popping_private.hpp
index e2fec6d..83f7e2d 100644 (file)
@@ -45,19 +45,17 @@ union u_smx_scalar {
 struct s_smx_simcall {
   e_smx_simcall_t call;
   smx_actor_t issuer;
-  smx_timer_t timer;
+  smx_timer_t timeout_cb; // Callback to timeouts
   int mc_value;
   u_smx_scalar args[11];
   u_smx_scalar result;
 };
 
-#define SIMCALL_SET_MC_VALUE(simcall, value) ((simcall)->mc_value = (value))
-#define SIMCALL_GET_MC_VALUE(simcall) ((simcall)->mc_value)
+#define SIMCALL_SET_MC_VALUE(simcall, value) ((simcall).mc_value = (value))
+#define SIMCALL_GET_MC_VALUE(simcall) ((simcall).mc_value)
 
 /******************************** General *************************************/
 
-XBT_PRIVATE void SIMIX_simcall_answer(smx_simcall_t simcall);
-XBT_PRIVATE void SIMIX_simcall_handle(smx_simcall_t simcall, int value);
 XBT_PRIVATE const char* SIMIX_simcall_name(e_smx_simcall_t kind);
 XBT_PRIVATE void SIMIX_run_kernel(std::function<void()> const* code);
 XBT_PRIVATE void SIMIX_run_blocking(std::function<void()> const* code);
@@ -178,20 +176,20 @@ template <class T> inline typename std::remove_reference<T>::type unmarshal_raw(
   return unmarshal(type<T>(), simcall);
 }
 
-template <std::size_t I> inline void marshalArgs(smx_simcall_t simcall)
+template <std::size_t I> inline void marshal_args(smx_simcall_t simcall)
 {
   /* Nothing to do when no args */
 }
 
-template <std::size_t I, class A> inline void marshalArgs(smx_simcall_t simcall, A const& a)
+template <std::size_t I, class A> inline void marshal_args(smx_simcall_t simcall, A const& a)
 {
   marshal(simcall->args[I], a);
 }
 
-template <std::size_t I, class A, class... B> inline void marshalArgs(smx_simcall_t simcall, A const& a, B const&... b)
+template <std::size_t I, class A, class... B> inline void marshal_args(smx_simcall_t simcall, A const& a, B const&... b)
 {
   marshal(simcall->args[I], a);
-  marshalArgs<I + 1>(simcall, b...);
+  marshal_args<I + 1>(simcall, b...);
 }
 
 /** Initialize the simcall */
@@ -200,7 +198,7 @@ template <class... A> inline void marshal(smx_simcall_t simcall, e_smx_simcall_t
   simcall->call = call;
   memset(&simcall->result, 0, sizeof(simcall->result));
   memset(simcall->args, 0, sizeof(simcall->args));
-  marshalArgs<0>(simcall, a...);
+  marshal_args<0>(simcall, a...);
 }
 }
 }