Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make SimGrid compile again :)
[simgrid.git] / src / simix / smx_smurf_private.h
index f6e0389..61b606c 100644 (file)
@@ -242,7 +242,9 @@ typedef struct s_smx_simcall {
 
     struct {
       smx_action_t execution;
+      struct s_smx_simcall *simcall;
       e_smx_state_t result;
+
     } host_execution_wait;
 
     struct {
@@ -656,8 +658,9 @@ const char *SIMIX_simcall_name(e_smx_simcall_t kind);
 /*************************** New simcall interface ****************************/
 
 /* Pack all possible scalar types in an union */
-typedef union u_smx_scalar {
+union u_smx_scalar {
   char            c;
+  const char*     cc;
   short           s;
   int             i;
   long            l;
@@ -667,14 +670,18 @@ typedef union u_smx_scalar {
   unsigned long   ul;
   float           f;
   double          d;
-  void            *p;
-} u_smx_scalar_t;
+  void*           p;
+};
+
+#define SIMIX_pack_args(...) (u_smx_scalar_t[]){MAP(INIT_FIELD, __VA_ARGS__)}
+
 
 /*
  * Define scalar type wrappers to ease the use of simcalls.
  * These are used to wrap the arguments in SIMIX_simcall macro.
  */
 #define CHAR(x) (c,x)
+#define STRING(x) (cc,x)
 #define SHORT(x) (s,x)
 #define INT(x) (i,x)
 #define LONG(x) (l,x)
@@ -686,8 +693,6 @@ typedef union u_smx_scalar {
 #define DOUBLE(x) (d,x)
 #define PTR(x)  (p,x)
 
-#define MYMACRO(...)
-
 /*
  * Some macro machinery to get a MAP over the arguments of a variadic macro.
  * It uses a FOLD to apply a macro to every argument, and because there is