Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove this files to git
[simgrid.git] / src / simix / smx_smurf_private.h
index da45db6..3fe6281 100644 (file)
@@ -45,6 +45,8 @@ SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_GET_NAME),\
 SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_IS_SUSPENDED),\
 SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_GET_PROPERTIES),\
 SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_SLEEP),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_ON_EXIT),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_AUTO_RESTART_SET),\
 SIMCALL_ENUM_ELEMENT(SIMCALL_RDV_CREATE),\
 SIMCALL_ENUM_ELEMENT(SIMCALL_RDV_DESTROY),\
 SIMCALL_ENUM_ELEMENT(SIMCALL_RDV_GEY_BY_NAME),\
@@ -223,9 +225,11 @@ typedef struct s_smx_simcall {
       xbt_main_func_t code;
       void *data;
       const char *hostname;
+      double kill_time;
       int argc;
       char **argv;
       xbt_dict_t properties;
+      int auto_restart;
     } process_create;
 
     struct {
@@ -288,6 +292,17 @@ typedef struct s_smx_simcall {
       e_smx_state_t result;
     } process_sleep;
 
+    struct {
+      smx_process_t process;
+      int_f_pvoid_t fun;
+      void *data;
+    } process_on_exit;
+
+    struct {
+      smx_process_t process;
+      int auto_restart;
+    } process_auto_restart;
+
     struct {
       const char *name;
       smx_rdv_t result;
@@ -319,7 +334,7 @@ typedef struct s_smx_simcall {
       double rate;
       void *src_buff;
       size_t src_buff_size;
-      int (*match_fun)(void *, void *);
+      int (*match_fun)(void *, void *, smx_action_t);
       void *data;
       double timeout;
     } comm_send;
@@ -330,7 +345,7 @@ typedef struct s_smx_simcall {
       double rate;
       void *src_buff;
       size_t src_buff_size;
-      int (*match_fun)(void *, void *);
+      int (*match_fun)(void *, void *, smx_action_t);
       void (*clean_fun)(void *);
       void *data;
       int detached;
@@ -341,7 +356,7 @@ typedef struct s_smx_simcall {
       smx_rdv_t rdv;
       void *dst_buff;
       size_t *dst_buff_size;
-      int (*match_fun)(void *, void *);
+      int (*match_fun)(void *, void *, smx_action_t);
       void *data;
       double timeout;
     } comm_recv;
@@ -350,8 +365,8 @@ typedef struct s_smx_simcall {
       smx_rdv_t rdv;
       void *dst_buff;
       size_t *dst_buff_size;
-      int (*match_fun)(void *, void *);
-          void *data;
+      int (*match_fun)(void *, void *, smx_action_t);
+      void *data;
       smx_action_t result;
     } comm_irecv;
 
@@ -511,17 +526,36 @@ typedef struct s_smx_simcall {
       void *ptr;
       size_t size;
       size_t nmemb;
-      smx_file_t* stream;
-      size_t result;
+      smx_file_t stream;
+      double result;
     } file_read;
 
     struct {
       const void *ptr;
       size_t size;
       size_t nmemb;
-      smx_file_t* stream;
+      smx_file_t stream;
       size_t result;
     } file_write;
+
+    struct {
+      const char* mount;
+      const char* path;
+      const char* mode;
+      smx_file_t result;
+    } file_open;
+
+    struct {
+      smx_file_t fp;
+      int result;
+    } file_close;
+
+    struct {
+      smx_file_t fd;
+      s_file_stat_t buf;
+      int result;
+    } file_stat;
+
   };
 } s_smx_simcall_t, *smx_simcall_t;
 
@@ -531,7 +565,7 @@ void SIMIX_simcall_push(smx_process_t self);
 void SIMIX_simcall_answer(smx_simcall_t);
 void SIMIX_simcall_pre(smx_simcall_t, int);
 void SIMIX_simcall_post(smx_action_t);
-XBT_INLINE smx_simcall_t SIMIX_simcall_mine(void);
+smx_simcall_t SIMIX_simcall_mine(void);
 const char *SIMIX_simcall_name(e_smx_simcall_t kind);
 
 #endif