Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add a simcall for process_on_exit
[simgrid.git] / src / simix / smx_smurf_private.h
index 0a91461..6bc5391 100644 (file)
@@ -45,6 +45,7 @@ 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_RDV_CREATE),\
 SIMCALL_ENUM_ELEMENT(SIMCALL_RDV_DESTROY),\
 SIMCALL_ENUM_ELEMENT(SIMCALL_RDV_GEY_BY_NAME),\
@@ -223,6 +224,7 @@ 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;
@@ -288,6 +290,12 @@ 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 {
       const char *name;
       smx_rdv_t result;
@@ -319,7 +327,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 +338,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 +349,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 +358,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;
 
@@ -512,7 +520,7 @@ typedef struct s_smx_simcall {
       size_t size;
       size_t nmemb;
       smx_file_t stream;
-      size_t result;
+      double result;
     } file_read;
 
     struct {
@@ -524,6 +532,7 @@ typedef struct s_smx_simcall {
     } file_write;
 
     struct {
+      const char* mount;
       const char* path;
       const char* mode;
       smx_file_t result;
@@ -535,9 +544,8 @@ typedef struct s_smx_simcall {
     } file_close;
 
     struct {
-      int fd;
-      //Next should be struct stat* buf
-      void* buf;
+      smx_file_t fd;
+      s_file_stat_t buf;
       int result;
     } file_stat;