1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 
  11 
  12 #if !defined(OMPI_COMM_REQ_H)
  13 #define OMPI_COMM_REQ_H
  14 
  15 #include "opal/class/opal_list.h"
  16 #include "ompi/request/request.h"
  17 
  18 
  19 #define OMPI_COMM_REQUEST_MAX_SUBREQ 2
  20 
  21 typedef struct ompi_comm_request_t {
  22     ompi_request_t super;
  23 
  24     opal_object_t *context;
  25     opal_list_t schedule;
  26 } ompi_comm_request_t;
  27 OBJ_CLASS_DECLARATION(ompi_comm_request_t);
  28 
  29 typedef int (*ompi_comm_request_callback_fn_t) (ompi_comm_request_t *);
  30 
  31 void ompi_comm_request_init (void);
  32 void ompi_comm_request_fini (void);
  33 int ompi_comm_request_schedule_append (ompi_comm_request_t *request, ompi_comm_request_callback_fn_t callback,
  34                             ompi_request_t *subreqs[], int subreq_count);
  35 void ompi_comm_request_start (ompi_comm_request_t *request);
  36 ompi_comm_request_t *ompi_comm_request_get (void);
  37 void ompi_comm_request_return (ompi_comm_request_t *request);
  38 
  39 #endif