root/ompi/mca/pml/cm/pml_cm_cancel.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. mca_pml_cm_cancel

   1 /*
   2  * Copyright (c) 2004-2006 The Regents of the University of California.
   3  *                         All rights reserved.
   4  * Copyright (c) 2006      Cisco Systems, Inc.  All rights reserved.
   5  * Copyright (c) 2012      Sandia National Laboratories.  All rights reserved.
   6  * $COPYRIGHT$
   7  *
   8  * Additional copyrights may follow
   9  *
  10  * $HEADER$
  11  */
  12 
  13 #include "ompi_config.h"
  14 
  15 #include "ompi/request/request.h"
  16 #include "ompi/mca/pml/base/pml_base_request.h"
  17 
  18 #include "pml_cm.h"
  19 #include "pml_cm_sendreq.h"
  20 #include "pml_cm_recvreq.h"
  21 
  22 int
  23 mca_pml_cm_cancel(struct ompi_request_t *ompi_req, int flag)
  24 {
  25     int ret;
  26     mca_pml_cm_request_t *base_request =
  27          (mca_pml_cm_request_t*) ompi_req;
  28     mca_mtl_request_t *mtl_req = NULL;
  29 
  30     switch (base_request->req_pml_type) {
  31     case MCA_PML_CM_REQUEST_SEND_HEAVY:
  32         {
  33             mca_pml_cm_hvy_send_request_t *request =
  34                 (mca_pml_cm_hvy_send_request_t*) base_request;
  35             mtl_req = &request->req_mtl;
  36         }
  37         break;
  38 
  39     case MCA_PML_CM_REQUEST_SEND_THIN:
  40         {
  41             mca_pml_cm_thin_send_request_t *request =
  42                 (mca_pml_cm_thin_send_request_t*) base_request;
  43             mtl_req = &request->req_mtl;
  44         }
  45         break;
  46 
  47     case MCA_PML_CM_REQUEST_RECV_HEAVY:
  48         {
  49             mca_pml_cm_hvy_recv_request_t *request =
  50                 (mca_pml_cm_hvy_recv_request_t*) base_request;
  51             mtl_req = &request->req_mtl;
  52         }
  53         break;
  54 
  55     case MCA_PML_CM_REQUEST_RECV_THIN:
  56         {
  57             mca_pml_cm_thin_recv_request_t *request =
  58                 (mca_pml_cm_thin_recv_request_t*) base_request;
  59             mtl_req = &request->req_mtl;
  60         }
  61         break;
  62 
  63     default:
  64         ret = OMPI_ERROR;
  65     }
  66 
  67     ret = OMPI_MTL_CALL(cancel(ompi_mtl,
  68                                mtl_req,
  69                                flag));
  70 
  71     return ret;
  72 }

/* [<][>][^][v][top][bottom][index][help] */