Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Change the wonderful magic value of the max number of simcall parameters.
[simgrid.git] / src / simix / smx_smurf_private.h
index f14c89d..dcd3402 100644 (file)
@@ -29,6 +29,7 @@ NUM_SIMCALLS
 } e_smx_simcall_t;
 
 typedef int (*simix_match_func_t)(void *, void *, smx_action_t);
+typedef void (*simix_copy_data_func_t)(smx_action_t, void*, size_t);
 typedef void (*simix_clean_func_t)(void *);
 typedef void (*FPtr)(void); // Hide the ugliness
 
@@ -47,6 +48,7 @@ union u_smx_scalar {
   double          d;
   size_t          sz;
   sg_size_t       sgsz;
+  sg_offset_t     sgoff;
   void*           dp;
   FPtr            fp;
   const void*     cp;
@@ -58,8 +60,10 @@ union u_smx_scalar {
 typedef struct s_smx_simcall {
   e_smx_simcall_t call;
   smx_process_t issuer;
+#ifdef HAVE_MC
   int mc_value;
-  union u_smx_scalar args[10];
+#endif
+  union u_smx_scalar args[11];
   union u_smx_scalar result;
   //FIXME: union u_smx_scalar retval;
   union {
@@ -72,6 +76,14 @@ typedef struct s_smx_simcall {
   };
 } s_smx_simcall_t, *smx_simcall_t;
 
+#if HAVE_MC
+#define SIMCALL_SET_MC_VALUE(simcall, value) ((simcall)->mc_value = (value))
+#define SIMCALL_GET_MC_VALUE(simcall) ((simcall)->mc_value)
+#else
+#define SIMCALL_SET_MC_VALUE(simcall, value) ((void)0)
+#define SIMCALL_GET_MC_VALUE(simcall) 0
+#endif
+
 #include "simcalls_generated_res_getter_setter.h"
 #include "simcalls_generated_args_getter_setter.h"