This source file includes following definitions.
- vprotocol_pessimist_request_construct
- mca_vprotocol_pessimist_request_free
   1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 
  11 #include "ompi_config.h"
  12 #include "vprotocol_pessimist_request.h"
  13 #include "vprotocol_pessimist_eventlog.h"
  14 #include "ompi/mca/pml/base/pml_base_request.h"
  15 
  16 static void vprotocol_pessimist_request_construct(mca_pml_base_request_t *req);
  17 
  18 OBJ_CLASS_INSTANCE(mca_vprotocol_pessimist_recv_request_t, mca_pml_base_request_t,
  19                    vprotocol_pessimist_request_construct, NULL);
  20 OBJ_CLASS_INSTANCE(mca_vprotocol_pessimist_send_request_t, mca_pml_base_request_t,
  21                    vprotocol_pessimist_request_construct, NULL);
  22 
  23 
  24 static void vprotocol_pessimist_request_construct(mca_pml_base_request_t *req)
  25 {
  26     mca_vprotocol_pessimist_request_t *ftreq;
  27 
  28     ftreq = VPESSIMIST_FTREQ(req);
  29     V_OUTPUT_VERBOSE(250, "pessimist:\treq\tnew\treq=%p\tPreq=%p (aligned to %p)", (void *) req, (void *) ftreq, (void *) &ftreq->pml_req_free);
  30     req->req_ompi.req_status.MPI_SOURCE = -1; 
  31     ftreq->pml_req_free = req->req_ompi.req_free;
  32     ftreq->event = NULL;
  33     ftreq->sb.bytes_progressed = 0;
  34     assert(ftreq->pml_req_free == req->req_ompi.req_free); 
  35     req->req_ompi.req_free = mca_vprotocol_pessimist_request_free;
  36     OBJ_CONSTRUCT(& ftreq->list_item, opal_list_item_t);
  37 }
  38 
  39 int mca_vprotocol_pessimist_request_free(ompi_request_t **req)
  40 {
  41     mca_pml_base_request_t *pmlreq = (mca_pml_base_request_t *) *req;
  42     V_OUTPUT_VERBOSE(50, "pessimist:\treq\tfree\t%"PRIpclock"\tpeer %d\ttag %d\tsize %lu", VPESSIMIST_FTREQ(pmlreq)->reqid, pmlreq->req_peer, pmlreq->req_tag, (unsigned long) pmlreq->req_count);
  43     vprotocol_pessimist_matching_log_finish(*req);
  44     pmlreq->req_ompi.req_status.MPI_SOURCE = -1; 
  45     vprotocol_pessimist_sender_based_flush(*req);
  46     return VPESSIMIST_FTREQ(pmlreq)->pml_req_free(req);
  47 }