Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
do not store the requests on the process's stack nor in the big vector
[simgrid.git] / src / simix / smurf_private.h
index 09050f9..f150f85 100644 (file)
@@ -9,6 +9,7 @@
 
 /********************************* Requests ***********************************/
 typedef enum {
 
 /********************************* Requests ***********************************/
 typedef enum {
+  REQ_NO_REQ, /* Used when there is no ongoing request here */
   REQ_HOST_GET_BY_NAME,
   REQ_HOST_GET_NAME,
   REQ_HOST_GET_PROPERTIES,
   REQ_HOST_GET_BY_NAME,
   REQ_HOST_GET_NAME,
   REQ_HOST_GET_PROPERTIES,
@@ -50,9 +51,11 @@ typedef enum {
   REQ_COMM_WAITANY,
   REQ_COMM_WAIT,
   REQ_COMM_TEST,
   REQ_COMM_WAITANY,
   REQ_COMM_WAIT,
   REQ_COMM_TEST,
+  REQ_COMM_TESTANY,
   REQ_COMM_GET_REMAINS,
   REQ_COMM_GET_STATE,
   REQ_COMM_GET_REMAINS,
   REQ_COMM_GET_STATE,
-  REQ_COMM_GET_DATA,
+  REQ_COMM_GET_SRC_DATA,
+  REQ_COMM_GET_DST_DATA,
   REQ_COMM_GET_SRC_BUFF,
   REQ_COMM_GET_DST_BUFF,
   REQ_COMM_GET_SRC_BUFF_SIZE,
   REQ_COMM_GET_SRC_BUFF,
   REQ_COMM_GET_DST_BUFF,
   REQ_COMM_GET_SRC_BUFF_SIZE,
@@ -276,14 +279,17 @@ typedef struct s_smx_req {
       double rate;
       void *src_buff;
       size_t src_buff_size;
       double rate;
       void *src_buff;
       size_t src_buff_size;
+      int (*match_fun)(void *, void *);
       void *data;
       void *data;
-      smx_action_t result;      
+      smx_action_t result;
     } comm_isend;
 
     struct {
       smx_rdv_t rdv;
       void *dst_buff;
       size_t *dst_buff_size;
     } comm_isend;
 
     struct {
       smx_rdv_t rdv;
       void *dst_buff;
       size_t *dst_buff_size;
+      int (*match_fun)(void *, void *);
+         void *data;
       smx_action_t result;
     } comm_irecv;
 
       smx_action_t result;
     } comm_irecv;
 
@@ -310,6 +316,11 @@ typedef struct s_smx_req {
       int result;
     } comm_test;
 
       int result;
     } comm_test;
 
+    struct {
+      xbt_dynar_t comms;
+      int result;
+    } comm_testany;
+
     struct {
       smx_action_t comm;
       double result;
     struct {
       smx_action_t comm;
       double result;
@@ -322,8 +333,13 @@ typedef struct s_smx_req {
 
     struct {
       smx_action_t comm;
 
     struct {
       smx_action_t comm;
-      void *result;    
-    } comm_get_data;
+      void *result;
+    } comm_get_src_data;
+
+    struct {
+      smx_action_t comm;
+      void *result;
+    } comm_get_dst_data;
 
     struct {
       smx_action_t comm;
 
     struct {
       smx_action_t comm;
@@ -455,13 +471,14 @@ typedef struct s_smx_req {
 
 void SIMIX_request_init(void);
 void SIMIX_request_destroy(void);
 
 void SIMIX_request_init(void);
 void SIMIX_request_destroy(void);
-void SIMIX_request_push(smx_req_t);
+void SIMIX_request_push(void);
 smx_req_t SIMIX_request_pop(void);
 void SIMIX_request_answer(smx_req_t);
 void SIMIX_request_pre(smx_req_t);
 void SIMIX_request_post(smx_action_t);
 int SIMIX_request_is_visible(smx_req_t req);
 int SIMIX_request_is_enabled(smx_req_t req);
 smx_req_t SIMIX_request_pop(void);
 void SIMIX_request_answer(smx_req_t);
 void SIMIX_request_pre(smx_req_t);
 void SIMIX_request_post(smx_action_t);
 int SIMIX_request_is_visible(smx_req_t req);
 int SIMIX_request_is_enabled(smx_req_t req);
+XBT_INLINE smx_req_t SIMIX_req_mine(void);
 
 #endif
 
 
 #endif