root/ompi/mca/osc/portals4/osc_portals4_request.h

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

INCLUDED FROM


   1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
   2 /*
   3  * Copyright (c) 2011-2013 Sandia National Laboratories.  All rights reserved.
   4  * Copyright (c) 2015-2018 Los Alamos National Security, LLC.  All rights
   5  *                         reserved.
   6  * $COPYRIGHT$
   7  *
   8  * Additional copyrights may follow
   9  *
  10  * $HEADER$
  11  */
  12 
  13 #ifndef OSC_PORTALS4_REQUEST_H
  14 #define OSC_PORTALS4_REQUEST_H
  15 
  16 #include "ompi/request/request.h"
  17 
  18 struct ompi_osc_portals4_request_t {
  19     ompi_request_t super;
  20     int32_t ops_expected;
  21     opal_atomic_int32_t ops_committed;
  22 };
  23 typedef struct ompi_osc_portals4_request_t ompi_osc_portals4_request_t;
  24 
  25 OBJ_CLASS_DECLARATION(ompi_osc_portals4_request_t);
  26 
  27 #define OMPI_OSC_PORTALS4_REQUEST_ALLOC(win, req)                       \
  28     do {                                                                \
  29         opal_free_list_item_t *item;                                    \
  30         item = opal_free_list_wait(&mca_osc_portals4_component.requests); \
  31         req = (ompi_osc_portals4_request_t*) item;                      \
  32         OMPI_REQUEST_INIT(&req->super, false);                          \
  33         req->super.req_mpi_object.win = win;                            \
  34         req->super.req_complete = false;                                \
  35         req->super.req_state = OMPI_REQUEST_ACTIVE;                     \
  36         req->super.req_status.MPI_ERROR = MPI_SUCCESS;                  \
  37         req->ops_expected = 0;                                          \
  38         req->ops_committed = 0;                                         \
  39     } while (0)
  40 
  41 #define OMPI_OSC_PORTALS4_REQUEST_RETURN(req)                           \
  42     do {                                                                \
  43         OMPI_REQUEST_FINI(&request->super);                             \
  44         opal_free_list_return (&mca_osc_portals4_component.requests,    \
  45                               (opal_free_list_item_t*) req);            \
  46     } while (0)
  47 
  48 
  49 #endif

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