root/ompi/mca/osc/pt2pt/osc_pt2pt_request.c

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

DEFINITIONS

This source file includes following definitions.
  1. request_cancel
  2. request_free
  3. request_construct

   1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
   2 /*
   3  * Copyright (c) 2011-2012 Sandia National Laboratories.  All rights reserved.
   4  * Copyright (c) 2014      Los Alamos National Security, LLC. All rights
   5  *                         reserved.
   6  * Copyright (c) 2016      The University of Tennessee and The University
   7  *                         of Tennessee Research Foundation.  All rights
   8  *                         reserved.
   9  * $COPYRIGHT$
  10  *
  11  * Additional copyrights may follow
  12  *
  13  * $HEADER$
  14  */
  15 
  16 #include "ompi_config.h"
  17 
  18 #include "ompi/request/request.h"
  19 #include "ompi/mca/osc/osc.h"
  20 #include "ompi/mca/osc/base/base.h"
  21 #include "ompi/mca/osc/base/osc_base_obj_convert.h"
  22 
  23 #include "osc_pt2pt.h"
  24 #include "osc_pt2pt_request.h"
  25 
  26 static int
  27 request_cancel(struct ompi_request_t *request, int complete)
  28 {
  29     return MPI_ERR_REQUEST;
  30 }
  31 
  32 static int
  33 request_free(struct ompi_request_t **ompi_req)
  34 {
  35     ompi_osc_pt2pt_request_t *request =
  36         (ompi_osc_pt2pt_request_t*) *ompi_req;
  37 
  38     if (REQUEST_COMPLETED != request->super.req_complete) {
  39         return MPI_ERR_REQUEST;
  40     }
  41 
  42     OMPI_OSC_PT2PT_REQUEST_RETURN(request);
  43 
  44     *ompi_req = MPI_REQUEST_NULL;
  45 
  46     return OMPI_SUCCESS;
  47 }
  48 
  49 static
  50 void
  51 request_construct(ompi_osc_pt2pt_request_t *request)
  52 {
  53     request->super.req_type = OMPI_REQUEST_WIN;
  54     request->super.req_status._cancelled = 0;
  55     request->super.req_free = request_free;
  56     request->super.req_cancel = request_cancel;
  57     request->outstanding_requests = 0;
  58 }
  59 
  60 OBJ_CLASS_INSTANCE(ompi_osc_pt2pt_request_t,
  61                    ompi_request_t,
  62                    request_construct,
  63                    NULL);

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