1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 
  11 
  12 
  13 
  14 
  15 
  16 
  17 
  18 
  19 
  20 
  21 
  22 
  23 #ifndef MCA_COMMON_OMPIO_REQUEST_H
  24 #define MCA_COMMON_OMPIO_REQUEST_H
  25 
  26 #include "ompi_config.h"
  27 #include "ompi/request/request.h"
  28 #include "ompi/mca/fbtl/fbtl.h"
  29 #include "common_ompio.h"
  30 
  31 BEGIN_C_DECLS
  32 
  33 extern opal_list_t mca_common_ompio_pending_requests;
  34 extern bool mca_common_ompio_progress_is_registered;
  35 
  36 
  37 
  38 
  39 typedef enum {
  40     MCA_OMPIO_REQUEST_WRITE,
  41     MCA_OMPIO_REQUEST_READ,
  42     MCA_OMPIO_REQUEST_WRITE_ALL,
  43     MCA_OMPIO_REQUEST_READ_ALL,
  44 } mca_ompio_request_type_t;
  45 
  46 
  47 
  48 
  49 
  50 struct mca_ompio_request_t {
  51     ompi_request_t                                 req_ompi;
  52     mca_ompio_request_type_t                       req_type;
  53     void                                          *req_data;
  54     opal_list_item_t                               req_item;
  55     void                                          *req_tbuf;
  56     size_t                                         req_size;
  57     opal_convertor_t                          req_convertor;
  58     mca_fbtl_base_module_progress_fn_t      req_progress_fn;
  59     mca_fbtl_base_module_request_free_fn_t      req_free_fn;
  60 };
  61 typedef struct mca_ompio_request_t mca_ompio_request_t;
  62 OBJ_CLASS_DECLARATION(mca_ompio_request_t);
  63 
  64 #define GET_OMPIO_REQ_FROM_ITEM(ITEM) ((mca_ompio_request_t *)((char *)ITEM - offsetof(struct mca_ompio_request_t,req_item)))
  65 
  66 
  67 OMPI_DECLSPEC void mca_common_ompio_request_init ( void);
  68 OMPI_DECLSPEC void mca_common_ompio_request_fini ( void ); 
  69 OMPI_DECLSPEC void mca_common_ompio_request_alloc ( mca_ompio_request_t **req, mca_ompio_request_type_t type);
  70 OMPI_DECLSPEC int mca_common_ompio_progress ( void);
  71 OMPI_DECLSPEC void mca_common_ompio_register_progress ( void ); 
  72 
  73 END_C_DECLS
  74 
  75 #endif