This source file includes following definitions.
- mca_pml_cm_send_request_free
- mca_pml_cm_send_request_completion
- mca_pml_cm_send_request_construct
   1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 
  11 
  12 
  13 
  14 
  15 
  16 
  17 
  18 
  19 #include "ompi_config.h"
  20 
  21 #include "pml_cm.h"
  22 #include "pml_cm_sendreq.h"
  23 
  24 
  25 
  26 
  27 
  28 
  29 
  30 
  31 
  32 static int
  33 mca_pml_cm_send_request_free(struct ompi_request_t** request)
  34 {
  35     mca_pml_cm_send_request_t* sendreq = *(mca_pml_cm_send_request_t**)request;
  36     assert( false == sendreq->req_base.req_free_called );
  37 
  38     sendreq->req_base.req_free_called = true;
  39     if( true == sendreq->req_base.req_pml_complete ) {
  40         if( MCA_PML_CM_REQUEST_SEND_THIN == sendreq->req_base.req_pml_type ) {
  41             MCA_PML_CM_THIN_SEND_REQUEST_RETURN( ((mca_pml_cm_thin_send_request_t*)  sendreq) );
  42         } else {
  43             MCA_PML_CM_HVY_SEND_REQUEST_RETURN( ((mca_pml_cm_hvy_send_request_t*)  sendreq) );
  44         }
  45     }
  46 
  47     *request = MPI_REQUEST_NULL;
  48     return OMPI_SUCCESS;
  49 }
  50 
  51 void
  52 mca_pml_cm_send_request_completion(struct mca_mtl_request_t *mtl_request)
  53 {
  54     mca_pml_cm_send_request_t *base_request =
  55         (mca_pml_cm_send_request_t*) mtl_request->ompi_req;
  56     if( MCA_PML_CM_REQUEST_SEND_THIN == base_request->req_base.req_pml_type ) {
  57         MCA_PML_CM_THIN_SEND_REQUEST_PML_COMPLETE(((mca_pml_cm_thin_send_request_t*) base_request));
  58     } else {
  59         MCA_PML_CM_HVY_SEND_REQUEST_PML_COMPLETE(((mca_pml_cm_hvy_send_request_t*) base_request));
  60     }
  61 }
  62 
  63 static void mca_pml_cm_send_request_construct(mca_pml_cm_hvy_send_request_t* sendreq)
  64 {
  65     
  66     sendreq->req_send.req_base.req_ompi.req_start = mca_pml_cm_start;
  67     sendreq->req_send.req_base.req_ompi.req_free = mca_pml_cm_send_request_free;
  68     sendreq->req_send.req_base.req_ompi.req_cancel = mca_pml_cm_cancel;
  69 }
  70 
  71 OBJ_CLASS_INSTANCE(mca_pml_cm_send_request_t,
  72                    mca_pml_cm_request_t,
  73                    NULL,
  74                    NULL);
  75 
  76 OBJ_CLASS_INSTANCE(mca_pml_cm_thin_send_request_t,
  77                    mca_pml_cm_send_request_t,
  78                    mca_pml_cm_send_request_construct,
  79                    NULL);
  80 
  81 OBJ_CLASS_INSTANCE(mca_pml_cm_hvy_send_request_t,
  82                    mca_pml_cm_send_request_t,
  83                    mca_pml_cm_send_request_construct,
  84                    NULL);
  85